Bug 1055753, reset fields before opening autocomplete popup, r=felipe
authorNeil Deakin <neil@mozilla.com>
Wed, 03 Sep 2014 11:33:44 -0400
changeset 203259 2ebd93f3e70f3892e99a503ea048483c2da01813
parent 203258 7b20a4e9ce15652b2bbb2469cc5d63293f6716a1
child 203260 10276ebe5711b34ada2db6d737742450a1d69bd8
push id48639
push userneil@mozilla.com
push dateWed, 03 Sep 2014 15:35:30 +0000
treeherdermozilla-inbound@2ebd93f3e70f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfelipe
bugs1055753
milestone35.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1055753, reset fields before opening autocomplete popup, r=felipe
toolkit/components/satchel/AutoCompleteE10S.jsm
--- a/toolkit/components/satchel/AutoCompleteE10S.jsm
+++ b/toolkit/components/satchel/AutoCompleteE10S.jsm
@@ -98,22 +98,21 @@ this.AutoCompleteE10S = {
     }
 
     this.popup.view = AutoCompleteE10SView;
 
     this.popup.selectedIndex = -1;
     this.popup.invalidate();
 
     if (count > 0) {
+      // Reset fields that were set from the last time the search popup was open
+      this.popup.mInput = null;
+      this.popup.showCommentColumn = false;
+      this.popup.showImageColumn = false;
       this.popup.openPopupAtScreen(this.x, this.y, true);
-      // Bug 947503 - This openPopup call is not triggering the "popupshowing"
-      // event, which autocomplete.xml uses to track the openness of the popup
-      // by setting its mPopupOpen flag. This flag needs to be properly set
-      // for closePopup to work. For now, we set it manually.
-      this.popup.mPopupOpen = true;
     } else {
       this.popup.closePopup();
     }
 
     return resultsArray;
   },
 
   // This function is used by the login manager, which uses a single message