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

refresh() doesn't work with autoWidth+loop #454

Open
haferburg opened this issue Apr 28, 2020 · 0 comments
Open

refresh() doesn't work with autoWidth+loop #454

haferburg opened this issue Apr 28, 2020 · 0 comments

Comments

@haferburg
Copy link

haferburg commented Apr 28, 2020

I'm adding and removing multiple images to the slider dynamically. I use {autoWidth: true, loop: true}, everything else is default. Here's a simple version.

https://jsfiddle.net/49fwb36s/

What I'm seeing in FF 75 is that after I add the items and call refresh(), sometimes all images disappear, and when I inspect the DOM I can see that the left and right clones are missing. Dragging sometimes makes the items reappear, but without the clones, dragging doesn't work properly.

I've also tried to add an on('load', ...) handler for each img, and then call refresh only after all images have been loaded. Still doesn't work.

Here's another version that uses imageLoaded to refresh after all images have been loaded. https://jsfiddle.net/4mabnqLs/

I'm wondering if this has anything to do with #146 (comment).

The only workaround I've found is to call refresh() after 1200 ms.

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

No branches or pull requests

1 participant