Skip to content

Commit 2f32860

Browse files
committed
🐛 Fix issue where hovering over a submenu in a XUL menupopup hides the entire menu
1 parent 23bde39 commit 2f32860

File tree

1 file changed

+5
-16
lines changed

1 file changed

+5
-16
lines changed

components/panels/content/xul-menupopup.js

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -40,29 +40,18 @@
4040
* @param {Event} event
4141
*/
4242
onPopupShown(event) {
43+
if (event.target != this) return;
44+
4345
this.setAttribute("open", "");
4446
}
4547

4648
/**
4749
* Fires when the popup starts being hidden
4850
*/
49-
onPopupHiding() {
50-
this.removeAttribute("open");
51+
onPopupHiding(event) {
52+
if (event.target !== this) return;
5153

52-
// Remove the panel once all transitions have completed
53-
if (this.getAttribute("animate") == "true") {
54-
this.addEventListener(
55-
"transitionend",
56-
() => {
57-
this.hidePopup();
58-
},
59-
{
60-
once: true
61-
}
62-
);
63-
} else {
64-
this.hidePopup();
65-
}
54+
this.removeAttribute("open");
6655
}
6756

6857
connectedCallback() {

0 commit comments

Comments
 (0)