Closed Bug 1774035 Opened 2 years ago Closed 2 years ago

Do not open popup from <input disabled type=color/file>

Categories

(Core :: DOM: Core & HTML, defect, P2)

defect

Tracking

()

RESOLVED FIXED
103 Branch
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 .click() does not open the popup, not sure the difference. (Edit: Ah yes, .click() is an absolute no-op if disabled, for sure)

Assignee: nobody → krosylight
Status: NEW → ASSIGNED

IsMutable is what we use on showPicker, so it seems reasonable to be consistent?

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.

Summary: Do not open popup from <input disabled type=color/file/etc.> → Do not open popup from <input disabled type=color/file>
Pushed by krosylight@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/84317cf0446c Stop opening pickers from disabled input elements r=smaug,emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/34430 for changes under testing/web-platform/tests

Ah, the assertion should be in each type block instead.

Flags: needinfo?(krosylight)
Upstream PR was closed without merging
Severity: -- → S3
Priority: -- → P2
Pushed by krosylight@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f7603664ef19 Stop opening pickers from disabled input elements r=smaug,emilio

Backed out for causing multiple failures on spelling-markers-009.html and HTMLInputElement.cpp

Flags: needinfo?(krosylight)
Flags: needinfo?(krosylight)
Upstream PR was closed without merging

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

Pushed by krosylight@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/07af30efd194 Stop opening pickers from disabled input elements r=smaug,emilio
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 103 Branch
Upstream PR merged by moz-wptsync-bot
See Also: → 1835336
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: