Bug 379571 autocomplete should not try to create empty search sessions r+sr=jag
authorneil@parkwaycc.co.uk
Fri, 04 May 2007 01:46:23 -0700
changeset 1083 116637ada9570e9e477aaf6710158c6621a414a3
parent 1082 94507555c604aecda90f24b1c48f4174972beb9a
child 1084 c843d213847b39e7a2ebf7fd2fa5cb16992fb0cd
push id1
push userbsmedberg@mozilla.com
push dateThu, 20 Mar 2008 16:49:24 +0000
treeherdermozilla-central@61007906a1f8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs379571
milestone1.9a5pre
Bug 379571 autocomplete should not try to create empty search sessions r+sr=jag
xpfe/components/autocomplete/resources/content/autocomplete.xml
--- 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);