diff --git a/toolkit/components/help/content/help.js b/toolkit/components/help/content/help.js index e654f60764d7..0b1e1642e30b 100644 --- a/toolkit/components/help/content/help.js +++ b/toolkit/components/help/content/help.js @@ -101,10 +101,6 @@ var helpFileDS; # reduction on all links within the current help set. var helpBaseURI; -var gIgnoreFocus = false; -var gClickSelectsAll; -var gIgnoreClick = false; - /* defaultTopic is either set 1. in the openHelp() call, passed as an argument to the Help window and evaluated in init(), or @@ -179,8 +175,9 @@ function init() { webProgress.addProgressListener(window.XULBrowserWindow, Components.interfaces.nsIWebProgress.NOTIFY_ALL); - gClickSelectsAll = getBoolPref("browser.urlbar.clickSelectsAll", true); - + var searchBox = document.getElementById("findText"); + searchBox.clickSelectsAll = getBoolPref("browser.urlbar.clickSelectsAll", true); + setTimeout(focusSearch, 0); } @@ -632,33 +629,6 @@ function onselect_loadURI(tree) { }// when switching between tabs a spurious row number is returned. } -// copied from browser.js to handle the searchbar -function SearchbarFocusHandler(aEvent, aElt) -{ - if (gIgnoreFocus) - gIgnoreFocus = false; - else if (gClickSelectsAll) - aElt.select(); -} - -function SearchbarMouseDownHandler(aEvent, aElt) -{ - if (aElt.hasAttribute("focused")) { - gIgnoreClick = true; - } else { - gIgnoreFocus = true; - gIgnoreClick = false; - aElt.setSelectionRange(0, 0); - } -} - -function SearchbarClickHandler(aEvent, aElt) -{ - if (!gIgnoreClick && gClickSelectsAll && aElt.selectionStart == aElt.selectionEnd) - aElt.select(); -} - - function focusSearch() { var searchBox = document.getElementById("findText"); searchBox.focus(); diff --git a/toolkit/components/help/content/help.xul b/toolkit/components/help/content/help.xul index 5ad31fa4e0be..d5c8ebbbd2a8 100644 --- a/toolkit/components/help/content/help.xul +++ b/toolkit/components/help/content/help.xul @@ -185,9 +185,6 @@