Closed
Bug 230854
Opened 21 years ago
Closed 21 years ago
autoCheck attribute of buttons elements isn't work
Categories
(Core :: XBL, defect)
Tracking
()
VERIFIED
FIXED
People
(Reporter: surkov, Assigned: hyatt)
References
Details
Attachments
(1 file)
1.35 KB,
patch
|
janv
:
review+
jag+mozilla
:
superreview+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007
If I have group of buttons, in instance, with attribute autoCheck="true" (or
without this attribute that is equivalent) then button will not checked
automaticaly on command event. Because event handler on oncommand event isn't
called in binging chrome://global/content/bindings/button.xml#button-base at all.
Reproducible: Always
Steps to Reproduce:
1. Create document with next content
2. <button group="1" type="radio" cheched="true"/>
<button group="1" type="radio"/>
<button group="1" type="radio"/>
3.
Actual Results:
Activated button isn't checked
Expected Results:
Activated button should be checked
Reporter | ||
Comment 1•21 years ago
|
||
Sorry. I was wrong. Problem appears only when I have attribute command. In this
case event handler on command event isn't called. In instance:
<command oncommand="alert(1)" label="test" id="cmd-test"/>
<button command="cmd-test" oncommand="alert(2)"/>
You'll see only message box with text "1".
The same maner binding button.xml#button-base provides work of autoCheck attribute.
Comment 2•21 years ago
|
||
We can't rely on command events, the comment was copied from checkbox.xml
Updated•21 years ago
|
Attachment #139015 -
Flags: review?(varga)
Comment 3•21 years ago
|
||
Comment on attachment 139015 [details] [diff] [review]
Proposed patch
I guess it's not possible to use capturing.
r=varga
Attachment #139015 -
Flags: review?(varga) → review+
Comment 4•21 years ago
|
||
Comment on attachment 139015 [details] [diff] [review]
Proposed patch
Jan, phases are irrelevent on the event target...
Attachment #139015 -
Flags: superreview?(jag)
Comment 5•21 years ago
|
||
Comment on attachment 139015 [details] [diff] [review]
Proposed patch
Looks good. Perhaps it would be better to put this code in a helper function
instead of duplicating it?
sr=jag either way.
Are there other bindings with this problem?
Wouldn't <handler event="command" phase="capturing"> cause this code to be
executed before other command listeners?
Attachment #139015 -
Flags: superreview?(jag) → superreview+
Comment 6•21 years ago
|
||
Fix checked in.
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Comment 7•21 years ago
|
||
Neil explained to me that the element bound to never sees the command event,
it's redirected to the <command> element pointed to, hence the need for onclick
and onkey handlers.
Comment 8•21 years ago
|
||
s/onclick/click/ and s/onkey/keypress/.
Comment 9•19 years ago
|
||
[Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8.1a2) Gecko/20060518 SeaMonkey/1.1a] (nightly) (W98SE)
V.Fixed (on MOZILLA_1_8_BRANCH), with testcase in bug 282180.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•