зеркало из https://github.com/mozilla/pjs.git
Bug 37638: URL bar is given focus by default in new window [via accel+N or File > New Navigator Window]
Bug 89835: Window opened up with JavaScript has focus in the URL bar while NN4 and IE put focus on the content area Focus will now always go to the content area unless we're opening for a blank page. r=bryner, sr=hewitt
This commit is contained in:
Родитель
8132ef6a46
Коммит
6261cfb8c4
|
@ -410,8 +410,8 @@ function Startup()
|
|||
|
||||
if (uriToLoad && uriToLoad != "about:blank") {
|
||||
gURLBar.value = uriToLoad;
|
||||
if ("arguments" in window && window.arguments.length >= 4) {
|
||||
loadURI(uriToLoad, window.arguments[3]);
|
||||
if ("arguments" in window && window.arguments.length >= 3) {
|
||||
loadURI(uriToLoad, window.arguments[2]);
|
||||
} else {
|
||||
loadURI(uriToLoad);
|
||||
}
|
||||
|
@ -428,12 +428,11 @@ function Startup()
|
|||
return;
|
||||
}
|
||||
|
||||
// Focus the content area if the caller instructed us to.
|
||||
if ("arguments" in window && window.arguments.length >= 3 && window.arguments[2] == true ||
|
||||
!window.locationbar.visible)
|
||||
setTimeout(WindowFocusTimerCallback, 0, _content);
|
||||
else
|
||||
// Focus the content area unless we're loading a blank page
|
||||
if (uriToLoad == "about:blank" && window.locationbar.visible)
|
||||
setTimeout(WindowFocusTimerCallback, 0, gURLBar);
|
||||
else
|
||||
setTimeout(WindowFocusTimerCallback, 0, _content);
|
||||
|
||||
// Perform default browser checking (after window opens).
|
||||
setTimeout( checkForDefaultBrowser, 0 );
|
||||
|
|
Загрузка…
Ссылка в новой задаче