swiper icon indicating copy to clipboard operation
swiper copied to clipboard

Disabling the `loopPreventsSlide` results in incorrect slides transition

Open nk-o opened this issue 1 year ago • 0 comments

Check that this is really a bug

  • [X] I confirm

Reproduction link

https://codepen.io/_nK/pen/wvmXJmr?editors=1010

Bug description

Hey guys.

When set loopPreventsSlide option to false, and click on the previous button too friquently (faster, then speed option set), carousel make a large transition between first and last slide. Just check the link https://codepen.io/_nK/pen/wvmXJmr?editors=1010 and click on the previous button like 2-3 times at once.

https://user-images.githubusercontent.com/14810891/183398348-11ca9247-1a0d-4fa2-a86a-2af0d3b98196.mp4

Sometimes I see such bug when loopPreventsSlide is true (default value), but it is harder to reproduce.

Expected Behavior

For example, in Flickity there is no such a bug. I have created almost similar carousel just for example - https://codepen.io/_nK/pen/wvmXdpR?editors=1010

https://user-images.githubusercontent.com/14810891/183398518-99e9c3ab-dce8-4f57-acf7-d27c1217ca76.mp4

Actual Behavior

No response

Swiper version

8.3.2

Platform/Target and Browser Versions

Windows Chrome, FireFox, Edge

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

nk-o avatar Aug 08 '22 10:08 nk-o