From 71569e1205eca2145c2c3ec14d28a5ac67498008 Mon Sep 17 00:00:00 2001 From: Alexandre Poirot Date: Wed, 15 Sep 2021 20:08:35 +0000 Subject: [PATCH] Bug 1729925 - [devtools] Avoid leaking the rule panel via a click listener. r=nchevobbe Differential Revision: https://phabricator.services.mozilla.com/D125543 --- devtools/client/inspector/rules/rules.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devtools/client/inspector/rules/rules.js b/devtools/client/inspector/rules/rules.js index ab28a7493d6d..13391bf07c8b 100644 --- a/devtools/client/inspector/rules/rules.js +++ b/devtools/client/inspector/rules/rules.js @@ -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);