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

setColor followed by resize breaks the picker #156

Closed
jimparis opened this issue Jan 9, 2021 · 2 comments
Closed

setColor followed by resize breaks the picker #156

jimparis opened this issue Jan 9, 2021 · 2 comments
Labels

Comments

@jimparis
Copy link

jimparis commented Jan 9, 2021

If you visit the demo at https://codepen.io/rakujira/pen/WZOeNq
and add the following to the bottom of the JS:

colorPicker.setColors(["#0000ff", '#00ff00']);
colorPicker.resize(200);

then the picker breaks (try dragging the handle).
Either one of those lines alone works as expected. Or wrapping the second line in a setTimeout like:

colorPicker.setColors(["#0000ff", '#00ff00']);
setTimeout(() => { colorPicker.resize(200); }, 0);
@jimparis
Copy link
Author

jimparis commented Jan 9, 2021

May be related to #153

@jaames jaames added the bug label Jan 15, 2021
@jaames jaames closed this as completed in 786b460 Mar 27, 2021
@jaames
Copy link
Owner

jaames commented Mar 27, 2021

Thanks for the report! Sorry for taking so long to get to this, it should be fixed in the next release (v 5.5.0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants