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

Loop with free mode in vertical direction, not smooth or accurate using mouse or trackpad #6323

Closed
5 of 6 tasks
cbergen opened this issue Feb 2, 2023 · 0 comments
Closed
5 of 6 tasks

Comments

@cbergen
Copy link

cbergen commented Feb 2, 2023

Check that this is really a bug

  • I confirm

Reproduction link

https://codesandbox.io/p/sandbox/swiper-infinite-loop-forked-07n3j6?file=%2Findex.html

Bug description

Using the mouse or trackpad on a vertical swiper in free mode is a bit of a mess. The scroll isn't smooth, the slides sometimes jump around, sometimes they don't seem to advance at all. Dragging the swiper works much better however.

var swiper = new Swiper(".mySwiper", {
      direction: "vertical",
      slidesPerView: "auto",
      spaceBetween: 30,
      loop: true,
      centeredSlides: true,
      freeMode: {
        enabled: true
      },
      mousewheel: {
        forceToAxis: true
      }
});

Expected Behavior

Smooth scrolling and seamless looping.

Actual Behavior

With trackpad using two fingers, sometimes the slides quiver but don't advance.

With a mousewheel, scrolling is not smooth and slides don't advance at the speed they should - or at all.

mousewheel.mov

Swiper version

9.0.0

Platform/Target and Browser Versions

macOS Chrome

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
Development

No branches or pull requests

1 participant