mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-06 17:16:12 +00:00
32034 - sidebar search fails if no navigator windows are open. r=bryner sr=ben
This commit is contained in:
parent
3246371a97
commit
095ae24cdf
@ -675,10 +675,16 @@ function doStop()
|
||||
|
||||
function doSearch()
|
||||
{
|
||||
var searchMode = nsPreferences.getIntPref("browser.search.mode", 0);
|
||||
var navWindow = getNavigatorWindow(true);
|
||||
if (navWindow._content)
|
||||
return onNavWindowLoad();
|
||||
navWindow.addEventListener("load", onNavWindowLoad, false);
|
||||
}
|
||||
|
||||
function onNavWindowLoad() {
|
||||
var navWindow = getNavigatorWindow(true);
|
||||
|
||||
// hide various columns
|
||||
var navWindow = getNavigatorWindow(false);
|
||||
if (navWindow && "_content" in navWindow && "isMozillaSearchWindow" in navWindow._content) {
|
||||
colNode = navWindow._content.document.getElementById("RelevanceColumn");
|
||||
if (colNode)
|
||||
@ -701,6 +707,7 @@ function doSearch()
|
||||
return;
|
||||
}
|
||||
|
||||
var searchMode = nsPreferences.getIntPref("browser.search.mode", 0);
|
||||
var engineURIs = [];
|
||||
if (searchMode > 0) {
|
||||
var foundEngine = false;
|
||||
|
Loading…
Reference in New Issue
Block a user