Bug 1256085 - fix hamburger menu losing pressed state when a context menu inside the panel closes, r?jaws draft
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Tue, 15 Mar 2016 21:28:31 +0000
changeset 340696 80223f03b81c4a2e0a9073a32c61d4bb153ce7c4
parent 340668 5d690a383e54c10b44491fef4643967fda68d5c4
child 516253 4c8a9e35a903d292a17321b3735ce9d4e23c25b6
push id13039
push usergijskruitbosch@gmail.com
push dateTue, 15 Mar 2016 21:37:11 +0000
reviewersjaws
bugs1256085
milestone48.0a1
Bug 1256085 - fix hamburger menu losing pressed state when a context menu inside the panel closes, r?jaws MozReview-Commit-ID: 6ZhBPlYMU4y
browser/components/customizableui/content/panelUI.js
--- a/browser/components/customizableui/content/panelUI.js
+++ b/browser/components/customizableui/content/panelUI.js
@@ -178,16 +178,21 @@ const PanelUI = {
     if (document.documentElement.hasAttribute("customizing")) {
       return;
     }
 
     this.panel.hidePopup();
   },
 
   handleEvent: function(aEvent) {
+    // Ignore context menus and menu button menus showing and hiding:
+    if (aEvent.type.startsWith("popup") &&
+        aEvent.target != this.panel) {
+      return;
+    }
     switch (aEvent.type) {
       case "popupshowing":
         this._adjustLabelsForAutoHyphens();
         // Fall through
       case "popupshown":
         // Fall through
       case "popuphiding":
         // Fall through