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

Initial color not set correctly when pickr parent is not visible. #226

Closed
DEfusion opened this issue Jul 6, 2020 · 2 comments · May be fixed by #229
Closed

Initial color not set correctly when pickr parent is not visible. #226

DEfusion opened this issue Jul 6, 2020 · 2 comments · May be fixed by #229
Labels
bug Something isn't working discussion This is a discussion about a change, feature or strongly code-related

Comments

@DEfusion
Copy link
Contributor

DEfusion commented Jul 6, 2020

What is the current behavior?

If the container the pickr is output in is not visible when it is created the position of the movable handles is not shown correctly on opening, this then has the knock-on effect of not setting the color correctly on interaction unless you click on the palette or a swatch first as can be seen in this video: https://share.getcloudapp.com/d5uWDWLB

Please provide the steps to reproduce and create a JSFiddle.

https://jsfiddle.net/5szxbhqk/

What is the expected behavior?

  • The elements of the pickr should have their controls in the correct position
  • Changing the value by using the hue or alpha slider should set the color correctly

Your environment:

Version (see Pickr.version): 1.7.1
Used bundle (es5 or normal one): es5
Used theme (default is classic): default
Browser-version:  Chrome 84
Operating-system:  OS X
@DEfusion DEfusion added the bug Something isn't working label Jul 6, 2020
@simonwep
Copy link
Owner

simonwep commented Jul 6, 2020

Fixed in 0d445e5, I'll publish a patch version in the next days!

DEfusion added a commit to bandzoogle/pickr that referenced this issue Jul 7, 2020
If the container the pickr is output in is not visible when it is created the position of the movable handles is not shown correctly on opening, this then has the knock-on effect of not setting the color correctly on interaction unless you click on the palette or a swatch first.

This change addresses that by ensuring the color is set on the first run of `show` after the picker is made visible.

Fixes simonwep#226
DEfusion added a commit to bandzoogle/pickr that referenced this issue Jul 7, 2020
If the container the pickr is output in is not visible when it is created the position of the movable handles is not shown correctly on opening, this then has the knock-on effect of not setting the color correctly on interaction unless you click on the palette or a swatch first.

This change addresses that by ensuring the color is set on the first run of `show` after the picker is made visible.

Fixes simonwep#226
@simonwep simonwep added the discussion This is a discussion about a change, feature or strongly code-related label Jul 13, 2020
@simonwep
Copy link
Owner

I've published 1.7.2 (Mainly because of a recent serious issue), I'll close this issue as we can work in the PR and the current fix is deployed. Thanks again for your efforts, this should be worked on! :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working discussion This is a discussion about a change, feature or strongly code-related
Projects
None yet
2 participants