mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-28 19:38:13 +00:00
Tools:Web Search (command-K) does not focus search box if no window is open, r=gavin sr=mano
This commit is contained in:
parent
2defb1043c
commit
dbf1f564b8
@ -3066,9 +3066,16 @@ const BrowserSearch = {
|
||||
win.BrowserSearch.webSearch();
|
||||
} else {
|
||||
// If there are no open browser windows, open a new one
|
||||
|
||||
// This needs to be in a timeout so that we don't end up refocused
|
||||
// in the url bar
|
||||
function webSearchCallback() {
|
||||
setTimeout(BrowserSearch.webSearch, 0);
|
||||
}
|
||||
|
||||
win = window.openDialog("chrome://browser/content/", "_blank",
|
||||
"chrome,all,dialog=no", "about:blank");
|
||||
win.addEventListener("load", BrowserSearch.webSearch, false);
|
||||
win.addEventListener("load", webSearchCallback, false);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user