Open Bug 1888546 Opened 10 months ago Updated 9 months ago

<input type="color"> elements become unresponsive if you try to close a color picker for one <input> by clicking on a different <input>

Categories

(Core :: Widget: Cocoa, defect, P3)

Desktop
Unspecified
defect

Tracking

()

People

(Reporter: rhn0312, Unassigned)

Details

Attachments

(2 files)

I'm running into an issue when working with multiple <input type="color"> elements where they become unresponsive if you try to close a color picker for one <input> by clicking on a different <input>. Although the initial color picker dialogue disappears, no change event is fired so when you click on the same input again the color picker popup does not appear. The only way to actually close the picker is by clicking the “X” button, so clicking away from the picker so it loses focus doesn’t close it either. You can replicate the behaviour in the “Try it” example on MDN by switching between the two inputs without clicking the “X” button:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/color

Hardware: Unspecified → Desktop
Component: DOM: Forms → DOM: Core & HTML

Possible solutions could be to fire a change event when the <input> element loses focus, or have it behave like a modal as with the file picker dialogue.

I don't see the problem on Linux (Wayland). Reporter, what operating system do you see the problem on?

Flags: needinfo?(ini)

I'm on macOS (Sonoma).

Flags: needinfo?(ini)

After testing on Windows, it seems like this may be a Mac specific issue. On Windows you must close the first color picker before selecting another, like a modal. I've attached videos of the behavior on Windows vs Mac.

tschuster, who should look at this and where does this belong? Looks like a bad interaction of DOM and Mac widget code.

Flags: needinfo?(tschuster)

We don't really have code that prevents pickers from different <input> elements from being opened, only per-element. I think this is something that would fall under the widget's responsibility.

Flags: needinfo?(tschuster)
Component: DOM: Core & HTML → Widget: Cocoa
Severity: -- → S3
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: