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

Phantom back/forth movements after end of transition with FreeMode(sticky) + Mousewheel in Vertical mode #7774

Open
5 of 6 tasks
vitpankin opened this issue Oct 18, 2024 · 3 comments

Comments

@vitpankin
Copy link

Check that this is really a bug

  • I confirm

Reproduction link

https://codesandbox.io/p/sandbox/swiper-freemode-forked-r569rk?file=%2Findex.html%3A91%2C10

Bug description

When user scrolls swiper with mouse\trackpad and when main part of scroll is done Swiper almost every time does a little movement in the same direction as scroll and then back. Looks very meh.
It reproduces with mousewheel + freemode(sticky) in in vertical mode. Drag and touch swipes are fine.

For me it looks like the error in mousewheel when you calculate scroll poisition and etc you may emit some phantom scroll event with some scroll momentum left and it scrolls a bit with the same direction and then goes back as expected.

Expected Behavior

To stop at snap point rock steady and solid.

Actual Behavior

Screen.Recording.2024-10-19.at.12.15.58.AM.Trimmed.mov

Swiper version

11.1.14

Platform/Target and Browser Versions

MacOS Brave Version 1.68.141 Chromium: 127.0.6533.120 (Official Build) (arm64)

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
@vitpankin
Copy link
Author

Also confirmend on Swiper 10.0.0

@rymkapro
Copy link

Same issue detected

@krtkvM
Copy link

krtkvM commented Oct 21, 2024

Yes, I have the same issue

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

3 participants