Bug 379571 autocomplete should not try to create empty search sessions r+sr=jag
--- a/xpfe/components/autocomplete/resources/content/autocomplete.xml
+++ b/xpfe/components/autocomplete/resources/content/autocomplete.xml
@@ -47,18 +47,20 @@
// set default property values
this.ifSetAttribute("timeout", 50);
this.ifSetAttribute("maxrows", 5);
this.ifSetAttribute("showpopup", true);
this.ifSetAttribute("disablehistory", true);
this.ifSetAttribute("disableKeyNavigation", true);
// initialize the search sessions
- this.initSearchSessions();
- this.initAutoCompleteSearch();
+ if (this.hasAttribute("searchSessions"))
+ this.initSearchSessions();
+ if (this.hasAttribute("autocompletesearch"))
+ this.initAutoCompleteSearch();
// hack to work around lack of bottom-up constructor calling
if ("initialize" in this.resultsPopup)
this.resultsPopup.initialize();
]]></constructor>
<destructor><![CDATA[
this.clearResults(false);