Do not open popup from <input disabled type=color/file>
Categories
(Core :: DOM: Core & HTML, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox103 | --- | fixed |
People
(Reporter: saschanaz, Assigned: saschanaz)
References
Details
(Keywords: parity-chrome, parity-safari)
Attachments
(1 file)
data:text/html,<input disabled type=file id=input><button onclick="input.dispatchEvent(new MouseEvent('click'))">Button</button>
Per the spec the only exceptions that can activate in a disabled state are checkboxes and radio buttons. Anything else must not trigger the activation behavior.
Interestingly (Edit: Ah yes, .click()
does not open the popup, not sure the difference..click()
is an absolute no-op if disabled, for sure)
Assignee | ||
Updated•2 years ago
|
Comment 1•2 years ago
|
||
https://searchfox.org/mozilla-central/rev/28ed523a3ed5dbf5f6b008cf1e28a9e8a8597b5e/toolkit/content/widgets/datetimebox.js#735 doesn't check for this, neither does https://searchfox.org/mozilla-central/rev/28ed523a3ed5dbf5f6b008cf1e28a9e8a8597b5e/dom/html/HTMLInputElement.cpp#3498
Probably an IsMutable()
check is easy enough there?
Assignee | ||
Comment 2•2 years ago
|
||
Updated•2 years ago
|
Assignee | ||
Comment 3•2 years ago
|
||
Filed https://github.com/w3c/webdriver/issues/1666 for WebDriver.
TIL IsMutable()
, I wonder I should use it here instead? https://searchfox.org/mozilla-central/rev/28ed523a3ed5dbf5f6b008cf1e28a9e8a8597b5e/dom/html/HTMLInputElement.cpp#3657
Comment 4•2 years ago
|
||
IsMutable
is what we use on showPicker
, so it seems reasonable to be consistent?
Assignee | ||
Comment 5•2 years ago
|
||
Yeah, but showPicker is solely about pickers and click-to-open is about activation behavior. Somehow color
/file
are only things that have click-to-open as activation behavior (so that .click()
will show the picker) while others like date
does not. It's already inconsistent in that sense.
Comment 8•2 years ago
|
||
Backed out for causing crashes at mozilla::dom::HTMLInputElement.
Backout link: https://hg.mozilla.org/integration/autoland/rev/de09053e6ede0b98e5b7865b904221c9b80ea520
Failure log:
Assignee | ||
Comment 9•2 years ago
|
||
Ah, the assertion should be in each type block instead.
Updated•2 years ago
|
Comment 11•2 years ago
|
||
Comment 12•2 years ago
|
||
Backed out for causing multiple failures on spelling-markers-009.html and HTMLInputElement.cpp
Assignee | ||
Updated•2 years ago
|
Comment 14•2 years ago
|
||
And also can you please take a look at those reftest failures: https://treeherder.mozilla.org/logviewer?job_id=381304093&repo=autoland(In reply to Cristian Tuns from comment #12)
Backed out for causing multiple failures on spelling-markers-009.html and HTMLInputElement.cpp
Assignee | ||
Comment 15•2 years ago
|
||
The second push was without my fix, sorry for the noise. https://treeherder.mozilla.org/jobs?repo=try&revision=c770f79b279f35df188bb7340756a8d4153fca83
Comment 16•2 years ago
|
||
Comment 17•2 years ago
|
||
bugherder |
Description
•