Editing checkbox in element inspector behaves inconsistently
Reported by
teo8...@gmail.com,
Dec 8
|
||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.80 Safari/537.36 Steps to reproduce the problem: 1. visit https://output.jsbin.com/nuninidobu/1 2. Check the checkbox, then uncheck it 3. right click on the checkbox, select Inspect Element 4. In the Element Inspector, double-click on the checkbox element, and modify it so that it reads ``<input type="checkbox" disabled>`` (that is, add the "disabled" attribute") 5. Now double click again and also add a "checked attribute", so the node reads like this: <input type="checkbox" disabled checked> What is the expected behavior? The checkbox should now be disabled and checked What went wrong? The checkbox is disabled but not checked. The inspector shows it has the "checked" attribute, which is inconsistent with what is seen in the actual rendered HTML. Note that you won't observe the issue if you skip step 2. Did this work before? N/A Chrome version: 71.0.3578.80 Channel: stable OS Version: Flash Version: This kind of completely nonsense behavior is VERY SERIOUS, as it makes developers like me WASTE A LOT OF TIME. One usually trusts the browser and the developer tools, and when something does not come out as expected, one usually assumes they are doing something wrong, and wastes time trying to figure it out.
,
Dec 10
teo8976@ Thanks for the issue. Able to reproduce this issue on Mac OS 10.13.6,Windows 10 and Ubuntu 17.10 on the latest Stable 71.0.3578.80 and latest Canary 73.0.3636.0. This is a Non-Regression issue as this behavior is observed from M-60 chrome builds. Attached is the screen shot for reference. Hence marking this as Untriaged for further updates from Dev. Thanks..
,
Dec 11
,
Dec 19
Thanks for the report. I agree that this behavior is very non-obvious, and DevTools currently offers no reason to explain it. However, setting the attribute 'checked' on an element is different from setting the 'checked' property on an object via JS. Setting the attributed 'checked' seems to affect the default checkedness value, by the standard [1]. This may be consistent across several browsers, but there seems to be a long record of confusion issue 657430 , issue 797154 , issue 814271 https://bugzilla.mozilla.org/show_bug.cgi?id=223003 https://bugzilla.mozilla.org/show_bug.cgi?id=327020 Merging this for now, and adding folks in case they have ideas. [1] https://html.spec.whatwg.org/multipage/input.html#attr-input-checked |
||||
►
Sign in to add a comment |
||||
Comment 1 by gov...@chromium.org
, Dec 9