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
--- 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();
}