diff --git a/chrome/content/zotero/customElements.js b/chrome/content/zotero/customElements.js index 8f6b15aa1a..c11bfe7747 100644 --- a/chrome/content/zotero/customElements.js +++ b/chrome/content/zotero/customElements.js @@ -102,7 +102,11 @@ 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.getAttribute("animate") || ["false", "false-once"].includes(this.getAttribute("animate"))) { + if ( + // open="true" and aria-hidden="true" means it's a native menupopup + (this.getAttribute("open", "true") && this.getAttribute("aria-hidden", "true")) + || !this.getAttribute("animate") + || ["false", "false-once"].includes(this.getAttribute("animate"))) { return; } e.preventDefault();