Bug 1387022 - Don't attempt to show the sidebar switcher panel if it's closing. r=Gijs
MozReview-Commit-ID: Cw0VrpC4V8U
--- a/browser/base/content/browser-sidebar.js
+++ b/browser/base/content/browser-sidebar.js
@@ -74,17 +74,17 @@ var SidebarUI = {
},
/**
* Opens the switcher panel if it's closed, or closes it if it's open.
*/
toggleSwitcherPanel() {
if (this._switcherPanel.state == "open" || this._switcherPanel.state == "showing") {
this.hideSwitcherPanel();
- } else {
+ } else if (this._switcherPanel.state == "closed") {
this.showSwitcherPanel();
}
},
hideSwitcherPanel() {
this._switcherPanel.hidePopup();
},