Ticket #5721 (closed bug: worksforme)
Webkit: Radio checked state incorrect when creating an input with a name
| Reported by: | sirshannon | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | 1.4 |
| Component: | core | Version: | 1.4a2 |
| Keywords: | webkit input radio checked | Cc: | |
| Blocking: | Blocked by: |
Change History
comment:1 Changed 3 years ago by dmethvin
- Status changed from new to closed
- Resolution set to invalid
comment:2 Changed 3 years ago by sirshannon
- Status changed from closed to reopened
- Resolution invalid deleted
Regardless of what the doctypes say about the attribute, I would expect the behavior to be consistent in both cases. Whether or not 'checked=""' is valid doesn't change the fact that the first example works, but the second example doesn't. This is a bug.
comment:3 Changed 3 years ago by addyosmani
- Priority changed from major to low
- Status changed from reopened to closed
- Resolution set to worksforme
I just ran your original test case in Chrome and Safari and was able to get the exact same output experienced in FireFox and IE.
Check here: http://jsfiddle.net/Lpdjp/1/
If the originally mentioned issue persists, please feel free to submit a new ticket and we will investigate once again. Closing for now.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

The checked attribute should be set to the value "checked" in the markup; setting it to an empty string isn't consistent across doctypes. When the value is set via jQuery you should use a boolean, e.g., .attr("checked", true).
http://www.w3schools.com/Xhtml/xhtml_syntax.asp