Bug 1394947 fix toggling the extension sidebars from menus, r?zombie
MozReview-Commit-ID: G2LGIzSl9Be
--- a/browser/components/extensions/ext-sidebarAction.js
+++ b/browser/components/extensions/ext-sidebarAction.js
@@ -177,17 +177,17 @@ this.sidebarAction = class extends Exten
broadcaster.setAttribute("autoCheck", "false");
broadcaster.setAttribute("type", "checkbox");
broadcaster.setAttribute("group", "sidebar");
broadcaster.setAttribute("label", details.title);
broadcaster.setAttribute("sidebarurl", this.sidebarUrl(details.panel));
// oncommand gets attached to menuitem, so we use the observes attribute to
// get the command id we pass to SidebarUI.
- broadcaster.setAttribute("oncommand", "SidebarUI.show(this.getAttribute('observes'))");
+ broadcaster.setAttribute("oncommand", "SidebarUI.toggle(this.getAttribute('observes'))");
let header = document.getElementById("sidebar-switcher-target");
header.addEventListener("SidebarShown", this.updateHeader);
// Insert a menuitem for View->Show Sidebars.
let menuitem = document.createElementNS(XUL_NS, "menuitem");
menuitem.setAttribute("id", this.menuId);
menuitem.setAttribute("observes", this.id);