Ensuring that drag does not move slides more than `options.flickMaxPages` allows
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,
}
https://user-images.githubusercontent.com/1666622/224034941-13c70078-e9c3-4f8a-9c18-0913e8bc2224.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.
Sorry for no related issue.
@Kreeg actually, there is at least one: #1002
Would love this to be fixed.
You can switch to our fork for now npm i [email protected]:IT-GRI/splide.git