Required attribute is still enforced for radio buttons after removing via JavaScript
Reported by
dylanmcc...@gmail.com,
Mar 18 2016
|
||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36 Example URL: Steps to reproduce the problem: 1. Load a page with an HTML form that includes radio buttons with the "required" attribute, and client-side validation enabled. 2. Remove the "required" attribute for each radio button by manipulating the DOM, either with the developer tools or with JavaScript on the page itself. 3. Attempt to submit the form without setting a value for the radio buttons. What is the expected behavior? The form should happily submit, because the radio buttons are no longer required. This is consistent with how other input elements behave. What went wrong? Instead, the form does not submit. Chrome requires that I select an option for the radio inputs. Does it occur on multiple sites: Yes Is it a problem with a plugin? No Did this work before? Yes I am unsure which version, but it would have been around three months ago Does this work in other browsers? N/A Chrome version: 49.0.2623.87 Channel: stable OS Version: Fedora 23 Flash Version: Shockwave Flash 21.0 r0 I am attaching a minimal test case which should reproduce the problem. Note that Firefox 45.0 exhibits the correct behaviour. My example form has two radio inputs and a text input which are all initially marked as required, but the "required" attribute is removed immediately after the page loads. Note that the validator only complains about the radio inputs - not the text input. This problem does not appear to happen in reverse, when I add the required attribute on page load.
,
Mar 19 2016
,
Mar 21 2016
,
Mar 23 2016
Reproduced with 49.0.2623.87 stable, and not reproduced with 51.0.2687.0 canary. I assume this was already fixed.
,
Mar 23 2016
Cool beans. Thanks for checking :) I'll keep an eye on this and leave a note if it appears again. |
||||
►
Sign in to add a comment |
||||
Comment 1 by dylanmcc...@gmail.com
, Mar 19 2016