Fixing bug 213922. Make SeaMonkey focus the content area of a new window when opened from a targetted link. r=bryner@brianryner.com, sr=ben@bengoodger.com, a=brendan@mozilla.org

This commit is contained in:
jst%mozilla.jstenback.com 2004-03-11 03:00:47 +00:00
Родитель 63a5c07448
Коммит 1a96c240dd
1 изменённых файлов: 8 добавлений и 2 удалений

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

@ -605,9 +605,15 @@ function Startup()
return;
}
// Focus the content area unless we're loading a blank page
// Focus the content area unless we're loading a blank page, or if
// we weren't passed any arguments. This "breaks" the
// javascript:window.open(); case where we don't get any arguments
// either, but we're loading about:blank, but focusing the content
// are is arguably correct in that case as well since the opener
// is very likely to put some content in the new window, and then
// the focus should be in the content area.
var navBar = document.getElementById("nav-bar");
if (uriToLoad == "about:blank" && !navBar.hidden && window.locationbar.visible)
if ("arguments" in window && uriToLoad == "about:blank" && !navBar.hidden && window.locationbar.visible)
setTimeout(WindowFocusTimerCallback, 0, gURLBar);
else
setTimeout(WindowFocusTimerCallback, 0, _content);