Bug 1729925 - [devtools] Avoid leaking the rule panel via a click listener. r=nchevobbe

Differential Revision: https://phabricator.services.mozilla.com/D125543
This commit is contained in:
Alexandre Poirot 2021-09-15 20:08:35 +00:00
parent 3697b58bfa
commit 71569e1205

View File

@ -851,7 +851,7 @@ CssRuleView.prototype = {
// Remove bound listeners
this.shortcuts.destroy();
this.styleDocument.removeEventListener("click", this);
this.styleDocument.removeEventListener("click", this, { capture: true });
this.element.removeEventListener("copy", this._onCopy);
this.element.removeEventListener("contextmenu", this._onContextMenu);
this.addRuleButton.removeEventListener("click", this._onAddRule);