swiper
swiper copied to clipboard
Autoplay loop rewinds even when true
Check that this is really a bug
- [X] I confirm
Reproduction link
https://stackblitz.com/edit/react-w8auhs?file=src/App.js
Bug description
I want it to slide like in the example here, but when it gets to the last slide it goes back to the beginning.
Autoplay doesn't work when centeredSlides is false. (Maybe this is a behavior I'm not sure about)
Expected Behavior
Continuous flow as in the example link.
Actual Behavior
When it reaches the last slide, it goes back to the first slide.
Swiper version
8.4.2
Platform/Target and Browser Versions
Ubuntu 22.04, Chrome 105.0.5195.52 x64
Validations
- [X] Follow our Code of Conduct
- [X] Read the docs.
- [X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
- [X] Make sure this is a Swiper issue and not a framework-specific issue
Would you like to open a PR for this bug?
- [ ] I'm willing to open a PR
Additional Info after a lot of tests
When I have both disabled freeMode and increment slides from 3 (the value of the above example) to 20, this fixes the issue. When I increase the slides to 4, the return of the stream is less obvious (i.e. faster), but this is still an issue.
Thanks.
Swiper v9 comes with fully reworked and now different loop functionality. If you have similar issues in Swiper 9, open a new issue with a CodeSandbox showing the issue.