Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

color on cancel event when comparison is false #307

Open
saeednazarix opened this issue Nov 19, 2021 · 0 comments
Open

color on cancel event when comparison is false #307

saeednazarix opened this issue Nov 19, 2021 · 0 comments
Labels
unconfirmed The problem isn't really clear

Comments

@saeednazarix
Copy link

saeednazarix commented Nov 19, 2021

What is the current behavior?

when comparison: false save button is not needed to set the new color so after any change, the new color is our actual color that has been set but when comparison: false cancel button still doing the same as comparison: true.

Suppose the initial color is red when we don't use comparison: false (default mode) we change color in color picker to black then white then yellow then brown without clicking on the save button so if we click on the cancel button we get our initial color (red) and because we didn't click on save it ignores all the changes we have made.
but in comparison: false again suppose the initial color is red, then we change color in color picker to black (now black get's set as our actual color), then we change color to white (now white get's set as our actual color) so meantime click on the cancel button and you would see it revert color to initial color (red) and ignores all of our color choices.

also, one of the preview bars (left bar in classic theme or top bar on monolith theme) sections won't update on selecting new colors.

Please provide the steps to reproduce and create a JSFiddle.

What is the expected behavior?

when we use comparison: false the cancel button should give us the color that we choose before the current color.
suppose the initial color is "A", we changed that color to "B" (now "B" is our actual color, then we changed that color to "C" so if we click on the cancel button now it would give us the color "B" (the previous actual color before current color) so It should not give us the color "A" (initial color). it ignores our color choices.
because we don't use the save button in comparison: false so each color we choose is our new actual color so the picker should not ignore our choices.
also, the preview bar should be doing the same thing as above.

just to mention when I said 'actual color', it is the color that is set as the main color (like the color when we click on the save button).

Your environment:

Version (see Pickr.version): latest - 1.8.2
Used bundle (es5 or normal one): both
Used theme (default is classic): all themes
Browser-version:  chrome 96 / firefox 94 / safari 15
Operating-system:  macOS Monterey 12.0.1
@saeednazarix saeednazarix added the unconfirmed The problem isn't really clear label Nov 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
unconfirmed The problem isn't really clear
Projects
None yet
Development

No branches or pull requests

1 participant