Bug 1576825 - fix deletion of item from incoming attachment list. r=aceman a=jorgk
authorJorg K <jorgk@jorgk.com>
Tue, 27 Aug 2019 21:36:48 +0200
changeset 36190 4b4dd99160f315c1290d49437ae219b888ab4835
parent 36189 07ec429a494851508d76355c3337e03a28c07adc
child 36191 0b2de2419beeadf29e237426eb91e3b89c15ebf9
push id392
push userclokep@gmail.com
push dateMon, 02 Sep 2019 20:17:19 +0000
reviewersaceman, jorgk
bugs1576825
Bug 1576825 - fix deletion of item from incoming attachment list. r=aceman a=jorgk
mail/components/preferences/applications.js
--- a/mail/components/preferences/applications.js
+++ b/mail/components/preferences/applications.js
@@ -1526,22 +1526,23 @@ var gApplicationsPane = {
 
   onDelete(aEvent) {
     // We want to delete if either the request came from the confirmDelete
     // method (which is the only thing that populates the aEvent parameter),
     // or we've hit the delete/backspace key while the list has focus.
     if ((aEvent || document.commandDispatcher.focusedElement == this._list) &&
         this._list.selectedIndex != -1) {
       let typeItem = this._list.getItemAtIndex(this._list.selectedIndex);
-      let handlerInfo = this._handledTypes[typeItem.type];
+      let type = typeItem.getAttribute("type");
+      let handlerInfo = this._handledTypes[type];
       let index = this._visibleTypes.indexOf(handlerInfo);
       if (index != -1)
         this._visibleTypes.splice(index, 1);
       handlerInfo.remove();
-      delete this._handledTypes[typeItem.type];
+      delete this._handledTypes[type];
       typeItem.remove();
     }
   },
 
   _getIconURLForHandlerApp(aHandlerApp) {
     if (aHandlerApp instanceof Ci.nsILocalHandlerApp)
       return this._getIconURLForFile(aHandlerApp.executable);