From 086c044dc34dfc0f74fbe41f4ecb402b2cd34884 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:13:33 +0200 Subject: Merging upstream version 125.0.1. Signed-off-by: Daniel Baumann --- .../customizableui/CustomizableUI.sys.mjs | 23 +++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'browser/components/customizableui/CustomizableUI.sys.mjs') diff --git a/browser/components/customizableui/CustomizableUI.sys.mjs b/browser/components/customizableui/CustomizableUI.sys.mjs index d748b93a92..5b09402dc1 100644 --- a/browser/components/customizableui/CustomizableUI.sys.mjs +++ b/browser/components/customizableui/CustomizableUI.sys.mjs @@ -1251,8 +1251,8 @@ var CustomizableUIInternal = { }, addPanelCloseListeners(aPanel) { - Services.els.addSystemEventListener(aPanel, "click", this, false); - Services.els.addSystemEventListener(aPanel, "keypress", this, false); + aPanel.addEventListener("click", this, { mozSystemGroup: true }); + aPanel.addEventListener("keypress", this, { mozSystemGroup: true }); let win = aPanel.ownerGlobal; if (!gPanelsForWindow.has(win)) { gPanelsForWindow.set(win, new Set()); @@ -1261,8 +1261,8 @@ var CustomizableUIInternal = { }, removePanelCloseListeners(aPanel) { - Services.els.removeSystemEventListener(aPanel, "click", this, false); - Services.els.removeSystemEventListener(aPanel, "keypress", this, false); + aPanel.removeEventListener("click", this, { mozSystemGroup: true }); + aPanel.removeEventListener("keypress", this, { mozSystemGroup: true }); let win = aPanel.ownerGlobal; let panels = gPanelsForWindow.get(win); if (panels) { @@ -5483,7 +5483,10 @@ class OverflowableToolbar { let mainViewId = multiview.getAttribute("mainViewId"); let mainView = doc.getElementById(mainViewId); let contextMenu = doc.getElementById(mainView.getAttribute("context")); - Services.els.addSystemEventListener(contextMenu, "command", this, true); + contextMenu.addEventListener("command", this, { + capture: true, + mozSystemGroup: true, + }); let anchor = this.#defaultListButton.icon; let popupshown = false; @@ -6082,12 +6085,10 @@ class OverflowableToolbar { let contextMenuId = this.#defaultListPanel.getAttribute("context"); if (contextMenuId) { let contextMenu = doc.getElementById(contextMenuId); - Services.els.removeSystemEventListener( - contextMenu, - "command", - this, - true - ); + contextMenu.removeEventListener("command", this, { + capture: true, + mozSystemGroup: true, + }); } } -- cgit v1.2.3