Bug 1371236 - don't try to open the overflow panel when in customize mode, r?jaws
MozReview-Commit-ID: H2mOlOkUNLG
--- a/browser/components/customizableui/CustomizableUI.jsm
+++ b/browser/components/customizableui/CustomizableUI.jsm
@@ -4136,17 +4136,19 @@ OverflowableToolbar.prototype = {
} else {
this._panel.hidePopup();
}
break;
case "customizationstarting":
this._disable();
break;
case "dragover":
- this._showWithTimeout();
+ if (this._enabled) {
+ this._showWithTimeout();
+ }
break;
case "dragend":
this._panel.hidePopup();
break;
case "popuphiding":
this._onPanelHiding(aEvent);
break;
case "resize":
@@ -4173,20 +4175,19 @@ OverflowableToolbar.prototype = {
gELS.addSystemEventListener(contextMenu, "command", this, true);
let anchor = doc.getAnonymousElementByAttribute(this._chevron, "class", "toolbarbutton-icon");
// Ensure we update the gEditUIVisible flag when opening the popup, in
// case the edit controls are in it.
this._panel.addEventListener("popupshowing", () => doc.defaultView.updateEditUIVisibility(), {once: true});
this._panel.openPopup(anchor || this._chevron);
this._chevron.open = true;
- let overflowableToolbarInstance = this;
- this._panel.addEventListener("popupshown", function(aEvent) {
- this.addEventListener("dragover", overflowableToolbarInstance);
- this.addEventListener("dragend", overflowableToolbarInstance);
+ this._panel.addEventListener("popupshown", aEvent => {
+ this._panel.addEventListener("dragover", this);
+ this._panel.addEventListener("dragend", this);
resolve();
}, {once: true});
});
},
_onClickChevron(aEvent) {
if (this._chevron.open) {
this._panel.hidePopup();