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

Broken Navigation with a specific configuration #5793

Closed
5 of 6 tasks
chili-fe opened this issue Jun 13, 2022 · 1 comment
Closed
5 of 6 tasks

Broken Navigation with a specific configuration #5793

chili-fe opened this issue Jun 13, 2022 · 1 comment
Labels

Comments

@chili-fe
Copy link

chili-fe commented Jun 13, 2022

Check that this is really a bug

  • I confirm

Reproduction link

https://codesandbox.io/s/swiper-default-react-forked-5kpc2j?file=/src/App.jsx:486-500

Bug description

The Swiper navigation is broken when using these configurations together:

  • loop = true
  • Breakpoints
    • A decimal slidesPerView value (e.g. 4.17)
    • slidesPerGroup > 1 (e.g. 4)

Expected Behavior

  • the Navigation start from the first slide
  • by clicking to the next or back arrow it moves by slidesPerGroup slides

Example:
slidesPerGroup: 4
slidesPerView: 4.4
current slide: 1
expected slide after right arrow click: 5

image
image

Actual Behavior

  • the Navigation start from the last slide
  • if you click the right or left arrow, the swiper doesn't shift the given number of slides (slidesPerGroup)

Example:
slidesPerGroup: 4
slidesPerView: 4.4
current slide: last slide
actual slide after right arrow click: a fraction of the first slide

image
image

Removing the loop = true, or the slidesPerGroup works as expected.

Swiper version

8.0.0

Platform/Target and Browser Versions

Chrome

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that requests 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
@nolimits4web
Copy link
Owner

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.

Repository owner locked and limited conversation to collaborators Feb 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants