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.31k stars 285 forks source link

Div should not be removed when destroy() #259

Closed FirstVertex closed 3 years ago

FirstVertex commented 3 years ago

When call destroy() the container div is removed from DOM. That was my div, expect lib to not delete it. In my case, pickr must be created/destroyed sometimes based on other conditions on page. When destroy and try to reopen, container div was removed.

Actually, container div was removed when pickr was created. Suggest to not replace it, just fill it. That way when destroy, you could leave div in same state as before pickr.

simonwep commented 3 years ago

destroy() does not remove anything at all, also see methods

Also: Please stick to the Issue Template. Create a JSFiddle and describe what you've done as detailed as possible and break your issue down to a minimum. This will help me to resolve it as fast as possible.