Bug 1555097 - make toolbarbutton-menu-button inherit command (and more) so e.g. fwd button will work. r=khushil
authorMagnus Melin <mkmelin+mozilla@iki.fi>
Thu, 30 May 2019 12:10:18 +0300
changeset 35725 4057acd16bb983361eca4d7876c5e6cd666c9aed
parent 35724 6b95c43c6c89432cfdcecc54e707e53f7b1bba03
child 35726 a6bbb29b55e5b214340877dab10d84bc7c7ade48
push id392
push userclokep@gmail.com
push dateMon, 02 Sep 2019 20:17:19 +0000
reviewerskhushil
bugs1555097
Bug 1555097 - make toolbarbutton-menu-button inherit command (and more) so e.g. fwd button will work. r=khushil Also remove the unused #menu-button binding
common/bindings/toolbar.xml
mail/base/content/toolbarbutton-menu-button.js
--- a/common/bindings/toolbar.xml
+++ b/common/bindings/toolbar.xml
@@ -507,23 +507,10 @@
     <content>
       <xul:hbox class="toolbarpaletteitem-box" xbl:inherits="type,place">
         <children/>
       </xul:hbox>
       <xul:label xbl:inherits="value=title"/>
     </content>
   </binding>
 
-  <binding id="menu-button"
-           extends="chrome://global/content/bindings/button.xml#button-base">
-
-    <content>
-      <children includes="observes|template|menupopup|panel|tooltip"/>
-      <xul:toolbarbutton class="box-inherit toolbarbutton-menubutton-button"
-                         anonid="button" flex="1" allowevents="true"
-                         xbl:inherits="disabled,crop,image,label,accesskey,command,wrap,badge,
-                                       align,dir,pack,orient,tooltiptext=buttontooltiptext"/>
-      <xul:dropmarker type="menu-button" class="toolbarbutton-menubutton-dropmarker"
-                      anonid="dropmarker" xbl:inherits="align,dir,pack,orient,disabled,label,open,consumeanchor"/>
-    </content>
-  </binding>
-
 </bindings>
+</bindings>
--- a/mail/base/content/toolbarbutton-menu-button.js
+++ b/mail/base/content/toolbarbutton-menu-button.js
@@ -16,17 +16,17 @@
    * like a normal toolbarbutton.
    *
    * @extends MozToolbarbutton
    */
   class MozToolbarButtonMenuButton extends customElements.get("toolbarbutton") {
     static get inheritedAttributes() {
       return {
         ...super.inheritedAttributes,
-        ".toolbarbutton-menubutton-button": "hidden,disabled",
+        ".toolbarbutton-menubutton-button": "command,hidden,disabled,align,dir,pack,orient,tooltiptext=buttontooltiptext",
         ".toolbarbutton-menubutton-dropmarker": "open,disabled",
       };
     }
     static get menubuttonFragment() {
       let frag = document.importNode(MozXULElement.parseXULToFragment(`
         <toolbarbutton class="box-inherit toolbarbutton-menubutton-button" flex="1" allowevents="true"></toolbarbutton>
         <dropmarker type="menu-button" class="toolbarbutton-menubutton-dropmarker"></dropmarker>
       `), true);