Bug 259724: Wrong behaviour of toolbarbutton when it is disabled

r+sr=neil


git-svn-id: svn://10.0.0.236/trunk@162552 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
Stefan.Borggraefe%gmx.de
2004-09-20 18:47:42 +00:00
parent b45740317a
commit 1d1c5e3796

View File

@@ -104,6 +104,22 @@
]]>
</body>
</method>
<method name="_handleClick">
<body>
<![CDATA[
if (!this.disabled &&
(this.autoCheck || !this.hasAttribute("autoCheck"))) {
if (this.type == "checkbox") {
this.checked = !this.checked;
} else if (this.type == "radio") {
this.checked = true;
}
}
]]>
</body>
</method>
</implementation>
<handlers>
@@ -111,29 +127,8 @@
because any external oncommand handlers might get called before ours,
and then they would see the incorrect value of checked. Additionally
a command attribute would redirect the command events anyway.-->
<handler event="click" button="0">
<![CDATA[
if (this.autoCheck || !this.hasAttribute("autoCheck")) {
if (this.type == "checkbox") {
this.checked = !this.checked;
} else if (this.type == "radio") {
this.checked = true;
}
}
]]>
</handler>
<handler event="keypress" key=" ">
<![CDATA[
if (this.autoCheck || !this.hasAttribute("autoCheck")) {
if (this.type == "checkbox") {
this.checked = !this.checked;
} else if (this.type == "radio") {
this.checked = true;
}
}
]]>
</handler>
<handler event="click" button="0" action="this._handleClick();"/>
<handler event="keypress" key=" " action="this._handleClick();"/>
<handler event="keypress">
<![CDATA[