calling click() on a label with disabled checkbox must not toggle its checked state
Categories
(Core :: DOM: Events, defect, P2)
Tracking
()
People
(Reporter: loic.laussel, Assigned: saschanaz)
References
(Blocks 2 open bugs, Regression, )
Details
(5 keywords)
Attachments
(1 file, 1 obsolete file)
User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36
Steps to reproduce:
Here's a pen to test https://codepen.io/lausselloic/pen/pBJNmV
Tested on FF64, FF65 and FF66 till FF65 the checked state is updated, that wasn't the case on FF64
Actual results:
Checkbox state change when mycheck.check() is called
Expected results:
Checkbox doesn't change as it's disabled
Comment 1•6 years ago
|
||
regression-window |
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Comment 3•6 years ago
|
||
This appears to be working (for me) in Nightly. Clicking the button checks the checkbox and the tick appears. The "checked" also returns either true or false.
Reporter | ||
Comment 4•6 years ago
|
||
Hello, Not sure to understand what's "working" the expected result with the attached codepen is "Checkbox doesn't change as it's disabled" but you write it's checked in your test, so for me it's still KO
Comment 5•6 years ago
|
||
My bad, I got it backwards.
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Comment 6•6 years ago
|
||
Code now checks if an input is both disabled for form events and disabled.
Comment 7•6 years ago
|
||
Comment 8•6 years ago
|
||
Try for black list approach:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=28cc172291d1f2c327e157cfe1f44e184d719e0b
Comment 10•5 years ago
|
||
Assignee | ||
Comment 11•5 years ago
|
||
I just filed an issue on HTML based on what I found about this bug: Every browser mutates the checkbox when dispatched a synthetic click event (but not when .click()
).
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 12•5 years ago
|
||
This patch intentionally does not ignore all click events on <input>
as web compatibility requires <input type="checkbox"> and
<input type="radio"> to mutate from dispatchEvent()
.
Depends on D87022
Comment 13•5 years ago
|
||
Comment 15•5 years ago
|
||
bugherder |
Updated•5 years ago
|
Description
•