Tools:Web Search (command-K) does not focus search box if no window is open, r=gavin sr=mano

This commit is contained in:
jminta%gmail.com 2006-07-19 18:29:31 +00:00
parent 2defb1043c
commit dbf1f564b8

View File

@ -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;
}