itsjavi / bootstrap-colorpicker

Bootstrap Colorpicker is a modular color picker plugin for Bootstrap.
https://itsjavi.com/bootstrap-colorpicker/
MIT License
1.38k stars 367 forks source link

Show picker on input focus together with colorpicker-input-addon #324

Open novakben opened 3 years ago

novakben commented 3 years ago

Description

Is there a built-in way to force colorpicker to open on text input focus and have the colorpicker-input-addon button? looked in the docs but couldn't find anywhere.

Context

Expected behavior

When color picker input is in focus, colorpicker component opens even when you use the colorpicker-input-addon.

Actual behavior

colorpicker opens only when pressing on colorpicker-input-addon

Thanks!

itsjavi commented 3 years ago

This is builtin functionality since the library automatically detects the addon

Did you try using events and opening the picker on focus?

Alf-Melmac commented 3 years ago

I think what he meant here, and I support this request, is an 'allowInputToggle' option. If this were set to True, I would not need to write an input listener that triggers the color picker. Some libraries that provide e.g. date or time selections offer this setting.