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.32k stars 284 forks source link

Color change cancel doesn't update color #272

Closed MarvNC closed 3 years ago

MarvNC commented 3 years ago

What is the current behavior?

After changing the color and clicking on the original color in the top left, the picker after the cancel event is fired does not return to having the original color.

Please provide the steps to reproduce and create a JSFiddle.

https://jsfiddle.net/fe862d71/2/

What is the expected behavior?

After clicking the top left color to cancel and getting the cancel event, the color accessed in the PickrInstance or the picker itself should have the original color. However, it takes two clicks of the original color for the picker instance to update its color.

Your environment:

Version (see Pickr.version): Latest
Used bundle (es5 or normal one): Normal (though it seems the fiddle template uses es5)
Used theme (default is classic): Classic
Browser-version:  Chrome 90
Operating-system:  Windows 10

https://user-images.githubusercontent.com/17340496/115302592-74278980-a117-11eb-8b1b-ceee05224afb.mp4