Bug 1354071 - make sure context menu continues to work correctly, r?mikedeboer
MozReview-Commit-ID: DZiwogYyDBv
--- a/browser/components/customizableui/CustomizableUI.jsm
+++ b/browser/components/customizableui/CustomizableUI.jsm
@@ -4114,17 +4114,19 @@ OverflowableToolbar.prototype = {
show() {
if (this._panel.state == "open") {
return Promise.resolve();
}
return new Promise(resolve => {
let doc = this._panel.ownerDocument;
this._panel.hidden = false;
- let contextMenu = doc.getElementById(this._panel.getAttribute("context"));
+ let mainViewId = this._panel.querySelector("panelmultiview").getAttribute("mainViewId");
+ let mainView = doc.getElementById(mainViewId);
+ let contextMenu = doc.getElementById(mainView.getAttribute("context"));
gELS.addSystemEventListener(contextMenu, "command", this, true);
let anchor = doc.getAnonymousElementByAttribute(this._chevron, "class", "toolbarbutton-icon");
this._panel.openPopup(anchor || this._chevron);
this._chevron.open = true;
let overflowableToolbarInstance = this;
this._panel.addEventListener("popupshown", function(aEvent) {
this.addEventListener("dragover", overflowableToolbarInstance);
--- a/browser/components/customizableui/content/panelUI.inc.xul
+++ b/browser/components/customizableui/content/panelUI.inc.xul
@@ -372,21 +372,21 @@
label="&customizeMenu.addMoreItems.label;"/>
</menupopup>
</panel>
<panel id="widget-overflow"
role="group"
type="arrow"
noautofocus="true"
- context="toolbar-context-menu"
position="bottomcenter topright"
hidden="true">
<panelmultiview mainViewId="widget-overflow-mainView">
- <panelview id="widget-overflow-mainView">
+ <panelview id="widget-overflow-mainView"
+ context="toolbar-context-menu">
<vbox id="widget-overflow-scroller">
<vbox id="widget-overflow-list" class="widget-overflow-list"
overflowfortoolbar="nav-bar"/>
</vbox>
</panelview>
</panelmultiview>
</panel>