Carousel advances once extra after swipe, with autoplay = false
See original GitHub issueThis is a known issue with a pull request and a closed bug report, but since the issue still appears to be present in the latest version of this package on npm, I thought it could do with a new open bug report highlighting it.
Bug summary: when you install the latest version and create a carousel with autoplay={false}
, then swipe either direction, after about 3 seconds the carousel will advance one slide of its own accord, as long as it isn’t already on the last slide of course.
The issue of these ‘ghost swipes’ appeared to be related to autoplay being initialised after a swipe, regardless of the state of the autoplay prop, and the PR looked like it remedied the issue. However, the issue persists as of version 3.2.19. It is worth noting that a fork by SUCHiDEV of react-responsive-carousel and published as npm package react-responsive-carousel-2 appears to have the issue fixed. That is the package I am currently using, but I would like to get back to using the original package if possible.
EDIT: I am not using the react-responsive-carousel-2 package, because it has other bugs which have since been fixed in the main version, and instead I am using the temporary fix suggested by jonaschan, which is to set the [autoplay] interval prop to a very large number of ms).
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:13 (3 by maintainers)
Top GitHub Comments
I’m also experiencing this issue. As a temporary workaround, I am setting interval to 9999999.
@finnmerlett my fix for this was just merged into the latest release, 3.2.21, so you can come back to the original package if you like and can close this issue 👍