Bug 74911 - Validity is not updated when a checked radio button is detached from the group
Summary: Validity is not updated when a checked radio button is detached from the group
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-19 21:39 PST by Kent Tamura
Modified: 2011-12-20 15:54 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kent Tamura 2011-12-19 21:39:07 PST
<form>
<input type=radio name=rg1 id=radio1 required>
<input type=radio name=rg1 id=radio2 checked>
</form>

The element 'radio1' is valid ($('radio1').validity.valid == true).  If the element 'radio2' is detached from the renderer tree or removed from the DOM tree, the validity of 'radio1' should be changed to false.
Comment 1 Kent Tamura 2011-12-19 21:45:54 PST
(In reply to comment #0)
> The element 'radio1' is valid ($('radio1').validity.valid == true).  If the element 'radio2' is detached from the renderer tree or removed from the DOM tree, the validity of 'radio1' should be changed to false.

Oops, it seems that there is no problem in a case of "removed from the DOM tree".
I saw the problem when $('radio2').style.display = 'none'.
Comment 2 Kent Tamura 2011-12-19 21:53:11 PST
As per the standard, element visibility should not affect the radio button validity.
Comment 3 Alexey Proskuryakov 2011-12-20 15:54:52 PST
Per the above comment, this is not a valid bug/request that we decline to fix, changing resolution to INVALID.