зеркало из https://github.com/mozilla/gecko-dev.git
32034 - sidebar search fails if no navigator windows are open. r=bryner sr=ben
This commit is contained in:
Родитель
bf8e1a8bc6
Коммит
1235b35158
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче