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

allowSlidePrev / allowSlideNext = false do not block slide change in loop mode #6987

Closed
5 of 6 tasks
marcfal opened this issue Aug 28, 2023 · 0 comments · May be fixed by abhishekbedi/framework7#1, Aarod23/nys-site#1 or wierza/Team-project#148

Comments

@marcfal
Copy link

marcfal commented Aug 28, 2023

Check that this is really a bug

  • I confirm

Reproduction link

https://codesandbox.io/p/sandbox/swiper-infinite-loop-forked-whl2xf?file=%2Findex.html%3A75%2C29

Bug description

Hi,

If

  • loop = true
  • allowSlidePrev = false
  • allowSlideNext = false

I'm still able to change slides by swiping, if I swipe for a long enough distance, even though no animation is playing.

Expected Behavior

The user should not be able to change slides by swiping.

Actual Behavior

The user is still able to change slides by swiping.
Note that the swipe animation is correctly disabled, but if the user keeps swiping, the slides will change anyway.
I have noticed that in order for that to happen, the user must swipe for a relatively long distance compared to the width of the slides, that's why in the repro example I've set the slides to a very narrow width.

Swiper version

10.2.0

Platform/Target and Browser Versions

Windows, Chrome 116.0.5845.111

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
Labels
None yet
Projects
None yet
1 participant