swiper icon indicating copy to clipboard operation
swiper copied to clipboard

Previous navigation not properly working

Open AnkitHinglajia opened this issue 3 years ago • 1 comments

Check that this is really a bug

  • [X] I confirm

Reproduction link

https://codesandbox.io/s/swiper-loop-bug-forked-ps5t8?file=/index.html

Bug description

There is a bug Swiper library that creates an odd behavior when clicking on the “prev” navigation button.

This issue happens when the slider is configured to loop the slides and the total number of slides is not evenly divisible by the number of slides to scroll.

Possible alternative to overcome this bug is [1] Turn off the loop or [2] turn on "loopFillGroupWithBlank" feature.

As per my requirement I can't enable above two methods. Can I have any solution for this issue?

Expected Behavior

Expected behavior is previous navigation button should slide to previous slide items when loop true and number of slide can be any.

Actual Behavior

This issue happens when the slider is configured to loop the slides and the total number of slides is not evenly divisible by the number of slides to scroll.

Swiper version

7.3.1

Platform/Target and Browser Versions

Windows/Ubuntu - Firefox 94 ,Chrome 96.0.4664.45

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

AnkitHinglajia avatar Dec 08 '21 13:12 AnkitHinglajia

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jun 12 '22 14:06 stale[bot]

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.

nolimits4web avatar Feb 01 '23 11:02 nolimits4web