From c6505d3e395ed0518a5dc6a6fe749f28701e7ccf Mon Sep 17 00:00:00 2001 From: windingwind <33902321+windingwind@users.noreply.github.com> Date: Fri, 22 Dec 2023 10:20:21 +0800 Subject: [PATCH] Fix submenu animation --- chrome/content/zotero/customElements.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/chrome/content/zotero/customElements.js b/chrome/content/zotero/customElements.js index 2bc164cca5..794ad5d6ba 100644 --- a/chrome/content/zotero/customElements.js +++ b/chrome/content/zotero/customElements.js @@ -118,6 +118,8 @@ Services.scriptloader.loadSubScript('chrome://zotero/content/elements/annotation this.addEventListener("popuphiding", (e) => { if ( this !== e.target + // Don't animate the popup if it's a submenu + || this.parentElement?.parentElement?.localName === "menupopup" // open="true" and aria-hidden="true" means it's a native menupopup || (this.getAttribute("open", "true") && this.getAttribute("aria-hidden", "true")) || !this.getAttribute("animate")