Bug 1396414 - Take the popup cancel path when dismissing the appMenu from CustomizableUI. r?Gijs
MozReview-Commit-ID: AWrW7qbP6Si
--- a/browser/components/customizableui/CustomizableUI.jsm
+++ b/browser/components/customizableui/CustomizableUI.jsm
@@ -1757,20 +1757,20 @@ var CustomizableUIInternal = {
}
// otherwise, this is the outer button, and the user will now
// interact with the menu:
return true;
}
return inInput || !inItem;
},
- hidePanelForNode(aNode) {
+ hidePanelForNode(aNode, aCancel) {
let panel = this._getPanelForNode(aNode);
if (panel) {
- panel.hidePopup();
+ panel.hidePopup(aCancel);
}
},
maybeAutoHidePanel(aEvent) {
if (aEvent.type == "keypress") {
if (aEvent.keyCode != aEvent.DOM_VK_RETURN) {
return;
}
@@ -1820,17 +1820,17 @@ var CustomizableUIInternal = {
} else {
multiview.showMainView();
}
return;
}
}
// If we get here, we can actually hide the popup:
- this.hidePanelForNode(aEvent.target);
+ this.hidePanelForNode(aEvent.target, true);
},
getUnusedWidgets(aWindowPalette) {
let window = aWindowPalette.ownerGlobal;
let isWindowPrivate = PrivateBrowsingUtils.isWindowPrivate(window);
// We use a Set because there can be overlap between the widgets in
// gPalette and the items in the palette, especially after the first
// customization, since programmatically generated widgets will remain