Bug 1387022 - Don't attempt to show the sidebar switcher panel if it's closing. r=Gijs draft
authorNihanth Subramanya <nhnt11@gmail.com>
Thu, 03 Aug 2017 17:41:41 +0530
changeset 620426 60d2bd8b124cc022696f34786b78bd9abcb918a8
parent 620338 63e261ce8cb04c913d2e6b19ea451b7078d24dc1
child 640687 3341c0251c206324eceaf85bb966c1c4a3178bac
push id72027
push usernhnt11@gmail.com
push dateThu, 03 Aug 2017 12:12:07 +0000
reviewersGijs
bugs1387022
milestone57.0a1
Bug 1387022 - Don't attempt to show the sidebar switcher panel if it's closing. r=Gijs MozReview-Commit-ID: Cw0VrpC4V8U
browser/base/content/browser-sidebar.js
--- 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();
   },