Bug 21534 - Radio button without name cannot be selected
Summary: Radio button without name cannot be selected
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Glenn Wilson
URL: https://www.switchyourhomeloan.co.nz/...
Keywords:
: 16337 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-10-10 15:52 PDT by Jon@Chromium
Modified: 2009-01-11 02:25 PST (History)
1 user (show)

See Also:


Attachments
in-process patch for issue 21534 (5.74 KB, patch)
2008-11-26 18:15 PST, Glenn Wilson
no flags Details | Formatted Diff | Diff
Possible patch for issue 21534 (8.23 KB, patch)
2008-12-05 17:50 PST, Glenn Wilson
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jon@Chromium 2008-10-10 15:52:00 PDT
Blocking Chromium, see bug http://code.google.com/p/chromium/issues/detail?id=3138

Seems like a strange thing to do but it turns out that in IE and FF you can select a radio button without a name.
Comment 1 Dave Hyatt 2008-10-10 15:55:32 PDT
You sure about IE?  Not letting you select a radio button without a name was deliberately copying IE.  Maybe they changed it in IE7 or 8.

Comment 2 Mark Rowe (bdash) 2008-10-10 17:24:45 PDT
What does it mean to be "Blocking Chromium"?
Comment 3 Jon@Chromium 2008-10-13 11:47:51 PDT
I checked IE 7 and it does allow you to select the radio buttons at the top of the example page which do not have names so they must have changed IE.

When I said Blocking Chromium I just meant that this is a copy from the Chromium bug database.  Perhaps I should pick different words to reflect different priorities?
Comment 4 Glenn Wilson 2008-11-26 18:15:10 PST
Created attachment 25546 [details]
in-process patch for issue 21534

IE7 and IE8 Beta (and Firefox) allow the user to check the radio button even if the name is not set.  

Here's an in-progress patch that simply removes logic that returns when the radio button name is not set.  I need to run more layout tests to see if this has any other adverse effects.
Comment 5 Glenn Wilson 2008-12-05 17:50:46 PST
Created attachment 25804 [details]
Possible patch for issue 21534

IE6 (and an earlier version of 7) had a quirk where they would not allow unnamed radio buttons to be selected.  WebKit mimicked this behavior.  However, now IE7 and 8 do allow the user to select unnamed radio buttons.

This patch modifies HTMLInputElement's behavior to treat named and unnamed radio buttons the same.  That is, this patch removes the checks that explicitly look for unnamed radios.

The only check that remains is in HTMLFormElement, which checks for radio button naming for grouping.  Unnamed radio buttons should not be grouped and can be selected ("on") simultaneously.  IE and FF behave this way, so I didn't modify this behavior.

This patch brings WebKit's behavior to parity with FF/IE7&8.
Comment 6 Darin Adler 2008-12-05 17:52:26 PST
Comment on attachment 25804 [details]
Possible patch for issue 21534

r=me
Comment 7 Alexey Proskuryakov 2008-12-07 02:02:45 PST
*** Bug 16337 has been marked as a duplicate of this bug. ***
Comment 8 Alexey Proskuryakov 2009-01-11 02:25:08 PST
Committed revision 39791.