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

Ensuring that drag does not move slides more than options.flickMaxPages allows #1118

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Kreeg
Copy link

@Kreeg Kreeg commented Mar 9, 2023

Description

If you drag the slider too fast, it moves more than options.flickMaxPages.
For example, there is a problem with caused with this config.

{
  flickMaxPages: 1,
  perMove: 1,
  perPage: 1,
}
video5411494184043422802.mp4

In this video you can see that sometimes slider moves more than 1 page. After some digging I found that this is computeDestinations problem. In fact, it's getPosition that causes this error. If you drag fast, it calculates that you are already at the next slide, but in reality, you are not.
So in this case I just added a new additional check that splide does not move more than it should.

Sorry for no related issue. This started as a local critical bug on our website so we can't wait too long. We have already switched to a forked version and have tested it in production mode. But I added more unit-tests to be sure.

@Kreeg Kreeg changed the title Ensuring that drag does not move slides more than allows Ensuring that drag does not move slides more than options.flickMaxPages allows Mar 9, 2023
@simonbrunel
Copy link

Sorry for no related issue.

@Kreeg actually, there is at least one: #1002

@tomikaka22
Copy link

Would love this to be fixed.

@Kreeg
Copy link
Author

Kreeg commented Apr 3, 2023

You can switch to our fork for now npm i git@github.com:IT-GRI/splide.git

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

Successfully merging this pull request may close these issues.

3 participants