Fix submenu animation

This commit is contained in:
windingwind 2023-12-22 10:20:21 +08:00 committed by Dan Stillman
parent 0b81fef457
commit c6505d3e39

View file

@ -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")