You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On an input field with a value of a color of a swatch, init the minicolors plugin. If you open minicolors you can see the swatch color isn't selected (if you type another value it is then selected)
This happens because on init updateFromInput is called and that doesn't do the logic of selecting the swatch instead it calls doChange but only when minicolors is initialized:
// Fire change event, but only if minicolors is fully initialized
if(input.data('minicolors-initialized')) {
doChange(input, value, opacity);
}
I'm not sure why doChange isn't called always, if it's just for performance issue or if it's to fix some bugs but I see 2 possible solutions: add swatch selection logic to init or updateFromInput or always call doChange even if minicolors is initialiazing.
The text was updated successfully, but these errors were encountered:
Steps to reproduce:
On an input field with a value of a color of a swatch, init the minicolors plugin. If you open minicolors you can see the swatch color isn't selected (if you type another value it is then selected)
This happens because on init updateFromInput is called and that doesn't do the logic of selecting the swatch instead it calls doChange but only when minicolors is initialized:
I'm not sure why doChange isn't called always, if it's just for performance issue or if it's to fix some bugs but I see 2 possible solutions: add swatch selection logic to init or updateFromInput or always call doChange even if minicolors is initialiazing.
The text was updated successfully, but these errors were encountered: