Closed Bug 639378 Opened 9 years ago Closed 7 years ago

Radio elements can't be part of the empty string group anymore

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set

Tracking

()

RESOLVED INVALID

People

(Reporter: mounir, Assigned: mounir)

References

()

Details

(Keywords: regression, testcase)

Attachments

(1 file, 2 obsolete files)

See URL for testcase.

In Firefox 3.6 and Opera, the first two radio's are in the same group and the last two in another group.
In Firefox 4 (nightly) and Webkit (trunk + Safari 5), all radio are in different groups.

This has been introduced by bug 583863: GetNameIfExists seems to be wrong and should be |return GetAttr(kNameSpaceID_None, nsGkAtoms::name, aName);| (which actually make the method quite useless...).
Assignee: nobody → mounir.lamouri
Status: NEW → ASSIGNED
Attachment #517415 - Flags: review?(jonas)
It's better if these groups can be invalid too...
Attachment #517415 - Attachment is obsolete: true
Attachment #517415 - Flags: review?(jonas)
Attachment #517416 - Flags: review?(jonas)
Whiteboard: [needs review]
Blocks: 639490
FWIW, IE6 has the same behavior as Opera and Firefox 4.0 and IE 9 has the behavior of Webkit and our trunk. Now, I wonder if that's per spec but I really can't find anything...
(In reply to comment #4)
> FWIW, IE6 has the same behavior as Opera and Firefox 4.0 and IE 9 has the

I meant Firefox 3.6...
Same thing without regressing form submission...
Attachment #517416 - Attachment is obsolete: true
Attachment #517416 - Flags: review?(jonas)
Attachment #518251 - Flags: review?(jonas)
Blocks: 641720
Jonas has open a bug against the specs to make our current behavior correct:
http://www.w3.org/Bugs/Public/show_bug.cgi?id=12301

The purpose of this bug might change depending on what is done with the spec bug.
Comment on attachment 518251 [details] [diff] [review]
Make the empty string radio group valid

I think we *should* treat <input type=radio name=""> the same as we do <input type=radio>. I.e. not put it in a group.

In all other instances an empty name is treated as no name so it's good for consistency. And it allows doing input.name = "" to remove it from any group.

I've filed a bug on this against the HTML spec.

http://www.w3.org/Bugs/Public/show_bug.cgi?id=12301
Attachment #518251 - Flags: review?(jonas) → review-
No longer blocks: 639490
No longer blocks: 641720
Depends on: 641720
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
Whiteboard: [needs review]
You need to log in before you can comment on or make changes to this bug.