-
Notifications
You must be signed in to change notification settings - Fork 244
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
Remove inline-styles on .destroy() #83
Comments
I removed all eventlisteners, and as far as I can see all listeners are gone. Hope this helped. thx Max |
Any chance this can be reopened? Calling destroy on a lory instance doesn't actually remove the inline styles. Unless I'm missing something. Example:
|
After actually looking in the source, I confirmed the suspicion that nothing removes the added styles in the destroy method. Adding a simple method and calling it when destroyed seems to take care of it.
|
Problem:
lory.destroy() does (currently broken see #84) unregister the slider but the styles on the js_slide element remain which can cause odd optical behaviour.
Solution:
Maintain added styles as object and on delete match against the current inline styles of the element (to prevent foreign styles to get deleted) and remove the ones added by lory before.
Update:
The items cloned by lory don't get removed on .destroy() too.
The text was updated successfully, but these errors were encountered: