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

Touch events are not handled correctly #60

Open
tobias-f opened this issue Oct 16, 2020 · 0 comments
Open

Touch events are not handled correctly #60

tobias-f opened this issue Oct 16, 2020 · 0 comments

Comments

@tobias-f
Copy link

If used on a mobile device the touch events are not handled correctly if the slider is used vertically. Instead of moving the slider, the whole page gets scrolled.

The issues seems to be located in line 169 of ReactCompareImage.tsx:

// Prevent default behavior other than mobile scrolling if (!('touches' in e)) { e.preventDefault(); }

Removing the if clause and preventing the default event handling, fixes the 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

1 participant