Closed
Bug 254238
Opened 20 years ago
Closed 20 years ago
<input type="radio"> fires onChange twice for each click
Categories
(Core :: DOM: UI Events & Focus Handling, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: MatsPalmgren_bugz, Unassigned)
References
()
Details
(Keywords: testcase)
Attachments
(2 files)
(deleted),
patch
|
jst
:
superreview+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
bzbarsky
:
review+
jst
:
superreview+
asa
:
approval1.8a6+
|
Details | Diff | Splinter Review |
Followup from bug 253299 comment 7:
Here is another problem that could be a regression from bug 17602.
Clicking the radio buttons, I see:
in Mozilla 1.7: focus, click, change
in 2004-07-26-07: focus, click, change, change
Comment 1•20 years ago
|
||
This is a pretty major DOM bug to have around.... See bug 275413 comment 3 for an
idea of why this is happening. Aaron, Brian, do you have any idea what's going on?
Flags: blocking1.8a6?
Comment 2•20 years ago
|
||
Aaron, time is getting pretty short for Alpha6. Can you take a look at this soon?
Flags: blocking1.8a6? → blocking1.8a6+
Comment 3•20 years ago
|
||
I'll try, but I'm on vacation. If possible can someone else take a look?
Comment 4•20 years ago
|
||
Johnny, are you available to look at this for 1.8a6?
Comment 5•20 years ago
|
||
It looks like this broke between 2004-04-28-08 and 2004-05-01-07. That's when
Brian landed bug 60212; of the checkins in that range, it's the most likely
culprit by far.
Checkin list:
http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=all&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2004-04-28+08%3A00%3A00&maxdate=2004-05-01+07%3A00%3A00&cvsroot=%2Fcvsroot
Comment 6•20 years ago
|
||
It looks to me like all munging of the BF_CHECKED_IS_TOGGLED flag, of the
selectedRadioButton variable, etc, is conditioned on us not being in capture
and not being in the system event group, except this little chunk of code
(which happens to be where we fire onchange). The patch fixes the testcase,
but I'm not completely sure how correct it is, unfortunately...
Attachment #170392 -
Flags: superreview?(jst)
Attachment #170392 -
Flags: review?(bryner)
Comment 7•20 years ago
|
||
Comment on attachment 170392 [details] [diff] [review]
Possible patch
Seems right to me. sr=jst
Attachment #170392 -
Flags: superreview?(jst) → superreview+
Comment 8•20 years ago
|
||
*** Bug 275413 has been marked as a duplicate of this bug. ***
Comment 9•20 years ago
|
||
I like this way better... makes us completely consistent.
Updated•20 years ago
|
Attachment #170685 -
Flags: superreview?(jst)
Attachment #170685 -
Flags: review?(bzbarsky)
Comment 10•20 years ago
|
||
Comment on attachment 170685 [details] [diff] [review]
alternate fix
I'm not sure "toggle" is a good word, since this is the event that causes
inputs to submit forms too, and all. Maybe "outerActivateEvent", with a
comment that this is the event that should cause the input's "default action",
whatever that is, to be triggered?
r=bzbarsky for the code. anyway, no matter how we resolve this variable naming
issue.
Attachment #170685 -
Flags: review?(bzbarsky) → review+
Comment 11•20 years ago
|
||
Comment on attachment 170685 [details] [diff] [review]
alternate fix
sr=jst
Attachment #170685 -
Flags: superreview?(jst) → superreview+
Comment 12•20 years ago
|
||
Comment on attachment 170685 [details] [diff] [review]
alternate fix
a=asa (on behalf of drivers) for checkin to 1.8a6
Attachment #170685 -
Flags: approval1.8a6+
Comment 13•20 years ago
|
||
checked in.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Updated•20 years ago
|
Attachment #170392 -
Flags: review?(bryner)
Updated•6 years ago
|
Component: Event Handling → User events and focus handling
You need to log in
before you can comment on or make changes to this bug.
Description
•