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

#517: Fix emulated touch never changing slide #556

Merged

Conversation

renancleyson-dev
Copy link
Contributor

@renancleyson-dev renancleyson-dev commented Feb 5, 2021

Fixes #517.

The cause

The handleClickItem is called when the mouse click is released on the end of a swipe, which sets the selectedItem state to the current slide and makes it impossible to change the slide through a swipe on non-touch devices since these devices will always trigger a click event while swiping.

Solution

It sets the cancelClick state to false on onSwipeForward and onSwipeBackwards, which prevents the handleClickItem to set the selectedItem state to the swiped item.

@kylesierens
Copy link

@leandrowd How often to you accept PR? When could we expect this one to be merged?

@leandrowd
Copy link
Owner

Sorry, I'm a bit time poor ATM. Will try to get to it this week.

@leandrowd
Copy link
Owner

Please test it thoroughly so I only need to press the merge button and publish it... This will make it easier. Let me know once you are confident this is ok to be merged.

@renancleyson-dev
Copy link
Contributor Author

I believe it can be merged now.

@leandrowd leandrowd merged commit 74e1d96 into leandrowd:master Feb 12, 2021
@leandrowd
Copy link
Owner

Published to npm as 3.2.12

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.

Swipe on non-touch device is a bit weird
3 participants