summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-26 06:42:11 +0200
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-26 06:42:11 +0200
commitb688bdfa9aae1806f151b76abca7ea65228ec816 (patch)
tree29d07ed05db2888c194921a1c9f47019132c7e2b
parent522095380fc6cf3b214746802012fccb8f1071bd (diff)
downloadUXP-b688bdfa9aae1806f151b76abca7ea65228ec816.tar
UXP-b688bdfa9aae1806f151b76abca7ea65228ec816.tar.gz
UXP-b688bdfa9aae1806f151b76abca7ea65228ec816.tar.lz
UXP-b688bdfa9aae1806f151b76abca7ea65228ec816.tar.xz
UXP-b688bdfa9aae1806f151b76abca7ea65228ec816.zip
Bug 574460 - Fix handling of permission deletion notifications in preference dialogs
-rw-r--r--application/palemoon/components/preferences/permissions.js15
1 files changed, 11 insertions, 4 deletions
diff --git a/application/palemoon/components/preferences/permissions.js b/application/palemoon/components/preferences/permissions.js
index 30c1db8be..015f96a32 100644
--- a/application/palemoon/components/preferences/permissions.js
+++ b/application/palemoon/components/preferences/permissions.js
@@ -238,10 +238,17 @@ var gPermissionManager = {
}
this._tree.treeBoxObject.invalidate();
}
- // No UI other than this window causes this method to be sent a "deleted"
- // notification, so we don't need to implement it since Delete is handled
- // directly by the Permission Removal handlers. If that ever changes, those
- // implementations will have to move into here.
+ else if (aData == "deleted") {
+ for (var i = 0; i < this._permissions.length; i++) {
+ if (this._permissions[i].host == permission.host) {
+ this._permissions.splice(i, 1);
+ this._view._rowCount--;
+ this._tree.treeBoxObject.rowCountChanged(this._view.rowCount - 1, -1);
+ this._tree.treeBoxObject.invalidate();
+ break;
+ }
+ }
+ }
}
},