From 687a6c5091ce352dc3feeba44f5794801eed8d68 Mon Sep 17 00:00:00 2001 From: windingwind <33902321+windingwind@users.noreply.github.com> Date: Sat, 16 Dec 2023 19:36:31 +0800 Subject: [PATCH] Fix exiting a submenu flashes the entire menu closed --- chrome/content/zotero/customElements.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/customElements.js b/chrome/content/zotero/customElements.js index c11bfe7747..3b482e0875 100644 --- a/chrome/content/zotero/customElements.js +++ b/chrome/content/zotero/customElements.js @@ -103,8 +103,9 @@ Services.scriptloader.loadSubScript('chrome://zotero/content/elements/annotation // Update animate attribute when the popup is hiding and trigger the fade out animation this.addEventListener("popuphiding", (e) => { if ( + this !== e.target // open="true" and aria-hidden="true" means it's a native menupopup - (this.getAttribute("open", "true") && this.getAttribute("aria-hidden", "true")) + || (this.getAttribute("open", "true") && this.getAttribute("aria-hidden", "true")) || !this.getAttribute("animate") || ["false", "false-once"].includes(this.getAttribute("animate"))) { return;