Bug 1533389 - stop leaving an item in the application handler list when sorting/filtering, r=jaws a=lizzard
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Thu, 07 Mar 2019 17:38:23 +0000
changeset 516320 8ec48086dfd3329592d38492ee6c8f76e090922b
parent 516319 13616d2ad00049ffa76ebdfc8b9702317a269d0c
child 516321 408920c5296e7f8e39ff3507d7fd903a5c0fade0
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws, lizzard
bugs1533389
milestone66.0
Bug 1533389 - stop leaving an item in the application handler list when sorting/filtering, r=jaws a=lizzard Differential Revision: https://phabricator.services.mozilla.com/D22545
browser/components/preferences/in-content/main.js
--- a/browser/components/preferences/in-content/main.js
+++ b/browser/components/preferences/in-content/main.js
@@ -1648,18 +1648,17 @@ var gMainPane = {
   },
 
   _rebuildView() {
     let lastSelectedType = this.selectedHandlerListItem &&
                            this.selectedHandlerListItem.handlerInfoWrapper.type;
     this.selectedHandlerListItem = null;
 
     // Clear the list of entries.
-    while (this._list.childNodes.length > 1)
-      this._list.removeChild(this._list.lastChild);
+    this._list.textContent = "";
 
     var visibleTypes = this._visibleTypes;
 
     // If the user is filtering the list, then only show matching types.
     if (this._filter.value)
       visibleTypes = visibleTypes.filter(this._matchesFilter, this);
 
     let items = visibleTypes.map(visibleType => new HandlerListItem(visibleType));