Closed Bug 639378 Opened 9 years ago Closed 7 years ago
Radio elements can't be part of the empty string group anymore
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...).
I think you mean Bug 547165, Bug 583863 didn't change this method ... http://hg.mozilla.org/mozilla-central/diff/40326c4f714c/content/html/content/src/nsHTMLInputElement.cpp
Assignee: nobody → mounir.lamouri
Status: NEW → ASSIGNED
Attachment #517415 - Flags: review?(jonas)
It's better if these groups can be invalid too...
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...
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-
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.