simonwep / pickr

🎨 Flat, simple, multi-themed, responsive and hackable Color-Picker library. No dependencies, no jQuery. Compatible with all CSS Frameworks e.g. Bootstrap, Materialize. Supports alpha channel, rgba, hsla, hsva and more!
https://simonwep.github.io/pickr
MIT License
4.31k stars 285 forks source link

Feature Request: Fire save when enter key is pressed in text input #261

Closed FirstVertex closed 3 years ago

FirstVertex commented 3 years ago

Hello, we need to suppress the built in save button, since we have pickr in a modal with it's own save button, to match our UX. But when user presses enter keyboard key in text input field, no save is raised.

Please, it would help with accessibility and usability, and to match other UX of our app, if we could fire an event at the time user presses enter in text field. Perhaps it is save event or perhaps other new event for representation of "enter key pressed".

Thank you for considering it.

simonwep commented 3 years ago

Here you go. It's all documented and in 90% you can just do it yourself using the API - no need to change the lib itself. And please use the issue template the next time you open an issue, it helps us maintainers to quickly orient ourselves and solve issues as fast as possible.