If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

"checked" attribute for checkbox or radio button is ignored

VERIFIED FIXED in mozilla1.0

Status

()

Core
Layout: Form Controls
VERIFIED FIXED
16 years ago
16 years ago

People

(Reporter: Koike Kazuhiko, Assigned: John Keiser (jkeiser))

Tracking

Trunk
mozilla1.0
x86
All
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

16 years ago
"checked" attribute for checkbox or radio button is ignored
if it's specified before "type" attribute.

<form>
<input type="checkbox" checked>checked<br>
<input checked type="checkbox">checked<br>
<hr>
<input type="radio" checked name="g1">group1(checked)
	<input type="radio" name="g1">group1<br>
<input checked type="radio" name="g2">group2(checked)
	<input type="radio" name="g2">group2
</form>
(Reporter)

Comment 1

16 years ago
Standard:
http://bugzilla.mozilla.gr.jp/showattachment.cgi?attach_id=608

Quirk:
http://bugzilla.mozilla.gr.jp/showattachment.cgi?attach_id=609
worksforme in a 2002-03-07-08 nightly.  Broken in 2002-03-08-07 nightly. 
jkeiser, I blame you.  :)
Assignee: rods → jkeiser
(Assignee)

Comment 3

16 years ago
Damn straight.  I thought I had caught all these permutations, but I guess not.
Keywords: nsbeta1
Target Milestone: --- → mozilla1.0
(Assignee)

Updated

16 years ago
Status: NEW → ASSIGNED
(Assignee)

Comment 4

16 years ago
Created attachment 73488 [details] [diff] [review]
Patch

Fixes the problem for me.  Everything still submits and such.

This patch also includes a minor optimization to make hidden inputs churn less
with memory (the way it is right now, <input type=hidden value=blah> will set
mValue equal to the value attribute and then delete mValue, for no reason).

Comment 5

16 years ago
Comment on attachment 73488 [details] [diff] [review]
Patch

r=rods
Attachment #73488 - Flags: review+
Comment on attachment 73488 [details] [diff] [review]
Patch

sr=jst
Attachment #73488 - Flags: superreview+
Comment on attachment 73488 [details] [diff] [review]
Patch

a=roc+moz
Attachment #73488 - Flags: approval+
(Assignee)

Comment 8

16 years ago
Fix checked in last night.
Status: ASSIGNED → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED

Comment 9

16 years ago
verified fixed on 
win2000 ---- buildID: 2002-03-22-05trunk
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.