Check for null focusedWindow in case of full-page plugins b=304243 r=IanN sr=jag

This commit is contained in:
neil%parkwaycc.co.uk 2006-07-29 05:43:42 +00:00
Родитель 1772bfcdac
Коммит f3b7088edc
1 изменённых файлов: 7 добавлений и 1 удалений

Просмотреть файл

@ -86,7 +86,13 @@ function toJavaConsole()
function toOpenWindow( aWindow )
{
aWindow.document.commandDispatcher.focusedWindow.focus();
try {
// Try to focus the previously focused window e.g. message compose body
aWindow.document.commandDispatcher.focusedWindow.focus();
} catch (e) {
// e.g. full-page plugin or non-XUL document; just raise the top window
aWindow.focus();
}
}
function toOpenWindowByType( inType, uri )