Index: branches/5.3.x/core/admin_templates/js/script.js =================================================================== diff -u -N -r15974 -r16395 --- branches/5.3.x/core/admin_templates/js/script.js (.../script.js) (revision 15974) +++ branches/5.3.x/core/admin_templates/js/script.js (.../script.js) (revision 16395) @@ -900,13 +900,22 @@ function set_window_title($title) { var $window = window; - if ( $window.name != 'main' ) { - // traverse through real popups - $window = getFrame('main'); + if ( main_title.length ) { + $title += ' - ' + main_title; } - $window.top.document.title = (main_title.length ? main_title + ' - ' : '') + $title; + if ( !$modal_windows && getWindowOpener($window) ) { + $window.document.title = $title; + } + else { + if ( $window.name != 'main' ) { + // Traverse through real popups. + $window = getFrame('main'); + } + $window.top.document.title = $title; + } + if ( $modal_windows ) { $window.TB.setWindowTitle(''); } @@ -1437,9 +1446,14 @@ var $frameset = $main_window.parent.frames; for ($i = 0; $i < $frameset.length; $i++) { - if ( $frameset[$i].name == $name ) { - return $frameset[$i]; + try { + if ($frameset[$i].name == $name) { + return $frameset[$i]; + } } + catch ( e ) { + // Foreign domain frame detected. + } } return $main_window.parent;