var svc = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefService); svc.getBranch(null); this.mSelectedIndex = val; if (val == null) this.mSearchBox.selectedIndex = null; return val; this.textbox.view.selectedIndex = val; return val; document.getAnonymousElementByAttribute(this, "role", "search-box"); var svc = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefService); svc.getBranch(null); false 0) this.mSearchBox.selectBy(aDir, aAmount); else if (this.mSearchBox.selectedIndex != null) this.mSearchBox.selectedIndex = null; return sel; ]]> // ensure that if a result menuitem is moused-over, any // search selection is cleared (function(aEvent) { if (aEvent.target.nodeName == "menuitem") this.mSearchBox.selectedIndex = null; }) // ensure that if the popup closes, any search selection is cleared (function(aEvent) { this.mSearchBox.selectedIndex = null; }) return this.mSelectedIndex; this.parentNode.textbox.onResultClick(); this.parentNode.selectedIndex = this.getAttribute("engineIndex"); this.parentNode.selectedIndex = null;