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

RESOLVED INVALID

Status

()

Core
DOM: Core & HTML
RESOLVED INVALID
6 years ago
4 years ago

People

(Reporter: mounir, Assigned: mounir)

Tracking

({regression, testcase})

Trunk
regression, testcase
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment, 2 obsolete attachments)

(Assignee)

Description

6 years ago
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
Blocks: 547165
No longer blocks: 583863
(Assignee)

Comment 2

6 years ago
Created attachment 517415 [details] [diff] [review]
Make the empty string radio group valid
Assignee: nobody → mounir.lamouri
Status: NEW → ASSIGNED
Attachment #517415 - Flags: review?(jonas)
(Assignee)

Comment 3

6 years ago
Created attachment 517416 [details] [diff] [review]
Make the empty string radio group valid

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)
(Assignee)

Updated

6 years ago
Whiteboard: [needs review]
(Assignee)

Updated

6 years ago
Blocks: 639490
(Assignee)

Comment 4

6 years ago
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...
(Assignee)

Comment 5

6 years ago
(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...
(Assignee)

Comment 6

6 years ago
Created attachment 518251 [details] [diff] [review]
Make the empty string radio group valid

Same thing without regressing form submission...
Attachment #517416 - Attachment is obsolete: true
Attachment #517416 - Flags: review?(jonas)
Attachment #518251 - Flags: review?(jonas)
(Assignee)

Updated

6 years ago
Blocks: 641720
(Assignee)

Comment 7

6 years ago
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-
(Assignee)

Updated

6 years ago
No longer blocks: 639490
(Assignee)

Updated

6 years ago
No longer blocks: 641720
Depends on: 641720
(Assignee)

Updated

4 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → INVALID
Whiteboard: [needs review]
You need to log in before you can comment on or make changes to this bug.