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
@@ -164,17 +164,17 @@
this._statusbar.label = this._originalStatusText;
]]>
</handler>
<handler event="DOMMenuItemActive">this._updateStatusText(event.target.statusText);</handler>
<handler event="DOMMenuItemInactive">this._updateStatusText("");</handler>
</handlers>
</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
@@ -316,16 +316,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;
+}
+
/********* menubar ***********/
menubar {
-moz-binding: url("chrome://global/content/bindings/toolbar.xml#menubar");
}
/********* menu ***********/