Bug 1451256 - Remove extends from toolbarpalleteitem. r=dao
Right now it uses extends="xul:button" so that the element it wraps doesn't get
mouse events. There's a way to do that with CSS, using pointer-events: none on
the child.
MozReview-Commit-ID: 29QZAoJPFt6
--- a/toolkit/content/widgets/toolbar.xml
+++ b/toolkit/content/widgets/toolbar.xml
@@ -120,17 +120,17 @@
this.getAttribute("customizing") != "true";
};
} catch (e) {}
}
]]></constructor>
</implementation>
</binding>
- <binding id="toolbarpaletteitem" extends="xul:button">
+ <binding id="toolbarpaletteitem">
<content>
<xul:hbox class="toolbarpaletteitem-box" flex="1" xbl:inherits="type,place">
<children/>
</xul:hbox>
</content>
</binding>
<binding id="toolbarpaletteitem-palette" extends="chrome://global/content/bindings/toolbar.xml#toolbarpaletteitem">
--- a/toolkit/content/xul.css
+++ b/toolkit/content/xul.css
@@ -310,16 +310,21 @@ toolbarpaletteitem {
-moz-binding: url("chrome://global/content/bindings/toolbar.xml#toolbarpaletteitem");
}
toolbarpaletteitem[place="palette"] {
-moz-box-orient: vertical;
-moz-binding: url("chrome://global/content/bindings/toolbar.xml#toolbarpaletteitem-palette");
}
+.toolbarpaletteitem-box {
+ /* Prevent children from getting events */
+ pointer-events: none;
+}
+
/********* menu ***********/
menubar > menu {
-moz-binding: url("chrome://global/content/bindings/menu.xml#menu-menubar");
}
menubar > menu.menu-iconic {
-moz-binding: url("chrome://global/content/bindings/menu.xml#menu-menubar-iconic");