mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-07 04:05:49 +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()
|
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
|
// hide various columns
|
||||||
var navWindow = getNavigatorWindow(false);
|
|
||||||
if (navWindow && "_content" in navWindow && "isMozillaSearchWindow" in navWindow._content) {
|
if (navWindow && "_content" in navWindow && "isMozillaSearchWindow" in navWindow._content) {
|
||||||
colNode = navWindow._content.document.getElementById("RelevanceColumn");
|
colNode = navWindow._content.document.getElementById("RelevanceColumn");
|
||||||
if (colNode)
|
if (colNode)
|
||||||
@ -701,6 +707,7 @@ function doSearch()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var searchMode = nsPreferences.getIntPref("browser.search.mode", 0);
|
||||||
var engineURIs = [];
|
var engineURIs = [];
|
||||||
if (searchMode > 0) {
|
if (searchMode > 0) {
|
||||||
var foundEngine = false;
|
var foundEngine = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user