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

Pagination flakey in loop mode if sPv > 1 #6856

Closed
5 of 6 tasks
armselig opened this issue Jul 13, 2023 · 0 comments · May be fixed by abhishekbedi/framework7#1, Aarod23/nys-site#1, wierza/Team-project#148 or TaylorBundy/swiper#4
Closed
5 of 6 tasks

Comments

@armselig
Copy link

Check that this is really a bug

  • I confirm

Reproduction link

https://codesandbox.io/p/sandbox/swiper-infinite-loop-forked-9jzp84?file=%2Findex.html%3A84%2C18

Bug description

If loop mode is activated and slidesPerView is greater than 1, navigating through the slides by pagination buttons breaks at some points. It does not matter to what value slidesPerGroup is set, except if it is identical to slidesPerView and the total amount of slides is a multiple of that value, i. e. 8 slides total and sPV and sPG equal 4. In that case it seems to work fine, otherwise not.

Expected Behavior

Clicking any of the pagination buttons scrolls to the expected (set of) slides.

Actual Behavior

The pagination seems to work for some clicks, but at some point results in one or several of the following:

  • Clicking any pagination button has no effect at all
  • Swiper scrolls to the correct position, but with excessive scrolling
  • Swiper scrolls to a random position and does not show all slides, e. g. only 2 of 4
  • The wrong pagination button is set to active

Swiper version

9.2.4, 10.0.4

Platform/Target and Browser Versions

macOS Chrome 114, macOS Firefox 115, macOS Safari 16

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
  • 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment