From 2f32860e2032711f3fe4f5c19ea763b48687442b Mon Sep 17 00:00:00 2001 From: EnderDev Date: Mon, 1 Jan 2024 19:53:57 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20issue=20where=20hovering?= =?UTF-8?q?=20over=20a=20submenu=20in=20a=20XUL=20menupopup=20hides=20the?= =?UTF-8?q?=20entire=20menu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/panels/content/xul-menupopup.js | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/components/panels/content/xul-menupopup.js b/components/panels/content/xul-menupopup.js index e6c58549ef..5807ef8def 100644 --- a/components/panels/content/xul-menupopup.js +++ b/components/panels/content/xul-menupopup.js @@ -40,29 +40,18 @@ * @param {Event} event */ onPopupShown(event) { + if (event.target != this) return; + this.setAttribute("open", ""); } /** * Fires when the popup starts being hidden */ - onPopupHiding() { - this.removeAttribute("open"); + onPopupHiding(event) { + if (event.target !== this) return; - // Remove the panel once all transitions have completed - if (this.getAttribute("animate") == "true") { - this.addEventListener( - "transitionend", - () => { - this.hidePopup(); - }, - { - once: true - } - ); - } else { - this.hidePopup(); - } + this.removeAttribute("open"); } connectedCallback() {