Ticket #10494 (closed bug: cantfix)
Radio button checked state inconsistent with e.preventDefault()
| Reported by: | halcyon1234 | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | None |
| Component: | event | Version: | 1.6.2 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
Click on a Radio Button that is part of a group. No radio button in the group is clicked yet. That radio button's click handler contains e.preventDefault().
Expected: That radio button will not become checked after any click, leaving the group "empty".
Result: The clicked radiobutton becomes checked. All further clicks work as expected.
Other note: I don't know if this is expected, but $(this).is(":checked") returns True, even though e.preventDefault() keeps it from retaining its check. I would have expected it never get checked in the first place, rather than become checked, then become unchecked. Could this "set/unset" check be the reason why the first radio button becomes checked-- because the browser doesn't support "clear checks from radio button group"?
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

Originally asked here: http://stackoverflow.com/questions/5982930/radio-preventdefault-not-working-on-chrome-and-ff-3-6-but-does-work-on-ie9-and
Here's a simpler test case:
http://jsfiddle.net/dmethvin/ABGPA/6/
But it also fails without jQuery:
http://jsfiddle.net/dmethvin/ABGPA/7/
This looks like a browser bug to me, one that we cannot easily fix since the browser is just ignoring preventDefault. Both Chrome and Firefox are on a fast release cycle, so if it is truly a bug it should be possible to report this to them and get it fixed.
The "other note" is a dup of #3827 but the main issue is not.