-
-
Notifications
You must be signed in to change notification settings - Fork 193
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
Destroying (eg on switching page) with autoplay plugin causes error: Cannot read properties of undefined (reading 'stopOnInteraction') #643
Comments
Thanks @tombryden for a complete bug report. I'll look into it when I get the chance. Best, |
Are there any updates on this? or is this not happening in previous versions so I could temporarily downgrade? |
@ciza99 I haven’t had the time to look into it. You can try downgrading and see if that solves the problem but I don’t know that either at the time of writing. |
@davidjerleke I can confirm that I have no issues on version |
Thanks @ciza99 for confirming! |
Hi @tombryden and @ciza99, When I include Best, |
Hi @davidjerleke. Just tested including |
@tombryden I found the culprit. A bug fix is on its way... |
@tombryden a bug fix for this was just released in v8.0.0-rc17. |
@davidjerleke Many thanks! |
Bug is related to
Embla Carousel version
v8.0.0-rc15
Describe the bug
Great work with this project!
Switching page (or destroying embla api) causes
Cannot read properties of undefined (reading 'stopOnInteraction')
when there are only a few elements in a carousel with the autoplay plugin. I am not sure what number of elements cause this problem - in our prod site, we are getting the error when displaying 4 slides while showing 4 at a time (flex: 0 0 25%). The example CodeSandbox shows this working with displaying 2 slides, and only having 2 slides in total, however failing with one slide with the same error.In most cases our prod app carousels contain 5+ slides so no issues, however there are instances where 4 or less slides are being displayed in dynamically rendered carousels, causing this error.
CodeSandbox
https://codesandbox.io/p/github/tombryden/embla-autoplay-bug/main
Steps to reproduce
Cannot read properties of undefined (reading 'stopOnInteraction')
error.Expected behavior
Behaviour of the reproduction should be consistent between the two scenarios
The text was updated successfully, but these errors were encountered: