Bug 1298204 - Make sure the form autocomplete popup tree gets updated when invalidated. r?MattN draft
authorMike Conley <mconley@mozilla.com>
Tue, 30 Aug 2016 22:57:26 -0400
changeset 408102 644aed75198f3b3b7ba4bf8ce592827aee88ead7
parent 407496 b18c8bcdc116eef8799880b7c50317bf54218474
child 530042 18180a7a46e39187c3e83b3ae36dc0a3aa77fe53
push id28143
push usermconley@mozilla.com
push dateWed, 31 Aug 2016 18:09:40 +0000
reviewersMattN
bugs1298204, 1294502
milestone51.0a1
Bug 1298204 - Make sure the form autocomplete popup tree gets updated when invalidated. r?MattN Bug 1294502 recently refactored the form autocomplete code to combine the e10s and non-e10s mechanisms. The new combined mechanism works using something mostly similar to what we used for e10s, except that we forgot to re-set the nsITreeView when the autocomplete results are invalidated. MozReview-Commit-ID: 4veXklEgLGl
toolkit/components/satchel/AutoCompletePopup.jsm
--- a/toolkit/components/satchel/AutoCompletePopup.jsm
+++ b/toolkit/components/satchel/AutoCompletePopup.jsm
@@ -157,16 +157,19 @@ this.AutoCompletePopup = {
     if (!this.openedPopup) {
       return;
     }
 
     if (!results.length) {
       this.closePopup();
     } else {
       AutoCompleteTreeView.setResults(results);
+      // We need to re-set the view in order for the
+      // tree to know the view has changed.
+      this.openedPopup.view = AutoCompleteTreeView;
       this.openedPopup.invalidate();
     }
   },
 
   closePopup() {
     if (this.openedPopup) {
       this.openedPopup.closePopup();
     }