Bug 154949 - HTMLFormElement's named property getter does not return a RadioNodelist
Summary: HTMLFormElement's named property getter does not return a RadioNodelist
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL: https://html.spec.whatwg.org/multipag...
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-02 19:30 PST by Frank Olivier
Modified: 2016-03-02 23:43 PST (History)
6 users (show)

See Also:


Attachments
Patch (5.49 KB, patch)
2016-03-02 22:28 PST, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Olivier 2016-03-02 19:30:56 PST
See https://jsfiddle.net/mjba21mk/5/

<form name="f">
 <input type="radio" name="r" value="value1" />
 <input type="radio" name="r" value="value2" checked />
</form>

document.f.r.value is undefined - as document.f.r is a NodeList
document.f.r.value should be “value2” - as document.f.r should be a RadioNodeList

Relevant spec https://w3c.github.io/html/single-page.html#the-htmlformcontrolscollection-interface

Works in latest Chrome, Firefox; will be fixed soon in Edge


This bug might be covered by https://bugs.webkit.org/show_bug.cgi?id=150957

Seen on https://www.washingtonpost.com/news/the-fix/wp/2015/10/06/hey-lets-all-make-our-own-donald-trump-hats/
User can’t create a white-and-gold hat in the MAKE A HAT GREAT AGAIN section
Comment 1 Chris Dumez 2016-03-02 21:29:32 PST
Did not mean to close this yet.
Comment 2 Chris Dumez 2016-03-02 21:54:21 PST
Actually, based on the test case, the issue is with HTMLFormElement's named property getter.
Comment 3 Chris Dumez 2016-03-02 22:28:50 PST
Created attachment 272732 [details]
Patch
Comment 4 WebKit Commit Bot 2016-03-02 23:43:52 PST
Comment on attachment 272732 [details]
Patch

Clearing flags on attachment: 272732

Committed r197497: <http://trac.webkit.org/changeset/197497>
Comment 5 WebKit Commit Bot 2016-03-02 23:43:58 PST
All reviewed patches have been landed.  Closing bug.