Skip to content

Commit

Permalink
🐛 Fix issue where hovering over a submenu in a XUL menupopup hides th…
Browse files Browse the repository at this point in the history
…e entire menu
  • Loading branch information
kierandrewett committed Jan 1, 2024
1 parent 23bde39 commit 2f32860
Showing 1 changed file with 5 additions and 16 deletions.
21 changes: 5 additions & 16 deletions components/panels/content/xul-menupopup.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 2f32860

Please sign in to comment.