Bug 1383913 - fix popuphiding listener for overflow panel to only 'count' the panel itself hiding, r?mixedpuppy
MozReview-Commit-ID: K2nvSimItyx
--- a/browser/components/customizableui/CustomizableUI.jsm
+++ b/browser/components/customizableui/CustomizableUI.jsm
@@ -4275,16 +4275,20 @@ OverflowableToolbar.prototype = {
this._panel.hidePopup();
this._chevron.open = false;
} else if (this._panel.state != "hiding") {
this.show();
}
},
_onPanelHiding(aEvent) {
+ if (aEvent.target != this._panel) {
+ // Ignore context menus, <select> popups, etc.
+ return;
+ }
this._chevron.open = false;
this._panel.removeEventListener("dragover", this);
this._panel.removeEventListener("dragend", this);
let doc = aEvent.target.ownerDocument;
doc.defaultView.updateEditUIVisibility();
let contextMenuId = this._panel.getAttribute("context");
if (contextMenuId) {
let contextMenu = doc.getElementById(contextMenuId);