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

Not initialized with the given color #31

Closed
ghost opened this issue Aug 24, 2018 · 5 comments
Closed

Not initialized with the given color #31

ghost opened this issue Aug 24, 2018 · 5 comments
Labels
bug Something isn't working

Comments

@ghost
Copy link

ghost commented Aug 24, 2018

Do you want to request a feature or report a bug?

bug

What is the current behavior?

Pickr does not initialized with the given color(#42445A),color picker zone is transparent.After I moved .pcr-picker picker's color will appeared,but not I defined.

avatar

avatar

After test,I'm sure this behavior conflicts with my code,but I have not found the problem in my code(allthough my code may has problem),maybe some code in Pickr is not very perfect.

If the current behavior is a bug, please provide the steps to reproduce.

What is the expected behavior?

Initialize with the color I defined.

Your environment:

Pickr-version:0.2.2
Browser-version:  Google Chrome68
Operating-system:  windows10
@simonwep
Copy link
Owner

First of all, it is not my goal to wirte very perfect code. Nobody does this and I'm sure no code is bug free.
But, regarding to your issue, if you think the behaviour conflicts with your code. Could you create a JSFiddle or provide some steps to reproduce it. If I cannot reproduce it in any way, I cannot fix it :)

Maybe related to #4

@ghost
Copy link
Author

ghost commented Aug 24, 2018

Actually ,the problem is about bootstrap's tab component,the first tab is ok,but other tab has bug,I have created a JSFiddle code

@simonwep
Copy link
Owner

simonwep commented Aug 24, 2018

Okay, found the issue. It's because pickr needs, for initializing, to be visible 'cause it calls getBoundingClientRect() which returns zeros if any parent (or the element itself) has display: none. I'll try to find a suitable solution.

@simonwep simonwep added the bug Something isn't working label Aug 24, 2018
@simonwep
Copy link
Owner

Fixed in 6571175
JSFiddle: https://jsfiddle.net/zbpn59cd/4/

There should be no conflict with other frameworks anymore (Initialization related).

@ghost
Copy link
Author

ghost commented Aug 25, 2018

Good job :-)

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant