In chrome on OSX when you select a color using a input with type=color:
<input name="color" type="color" />
The color picker stays open even after choosing a color. It stays open even when you reload the page.
How can I close this picker popup when a color is chosen?
To achieve disabled state in ColorPicker, set the disabled property to true . The ColorPicker pop-up cannot be accessed in disabled state.
The color picker depends heavily on a per-browser, per-platform implementation. There's technically no way to close the color picker programatically as a cross-browser solution.
What you can do instead is using a Javascript solution to render your own, cross-platform color picker like jscolor or similar, those even have proper touch support.
Edit: In this list you can see there's no close
event in the input type="color"
. Further reading tells me that since this is just an input like a text input or range input, it's not something you can "control". The alternative may be creating your own.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With