Bug 1533389 - stop leaving an item in the application handler list when sorting/filtering, r=jaws
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Thu, 07 Mar 2019 17:38:23 +0000
changeset 520871 109c5ab8dd9a301765a829af46fee93c794c00e2
parent 520870 3260913ff01a225aed9d21b30f6c152f503a0101
child 520872 6b899ba6ff6e589349c02024830af3e02f9ee132
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws
bugs1533389
milestone67.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 1533389 - stop leaving an item in the application handler list when sorting/filtering, r=jaws 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
@@ -1652,18 +1652,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));