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

(down) firing twice on iPad Safari version 13+ #5

Closed
trockets opened this issue Oct 14, 2019 · 2 comments
Closed

(down) firing twice on iPad Safari version 13+ #5

trockets opened this issue Oct 14, 2019 · 2 comments

Comments

@trockets
Copy link

My company uses this library mainly for the TouchEvent module. We found that on our iPads, after upgrading to iPadOs 13+, the (down) event would trigger our event handler twice. We did not see this behavior on our non-upgraded tablets. We also did not see this behavior on desktop.

iPadOs 13 brought Safari and some big changes to how iPadOs handles touch events and the 300ms delay.

kryops added a commit that referenced this issue Oct 15, 2019
…teners (#5)

This prevents the down/up event from firing twice on iOS 13 and Chrome Android
@kryops
Copy link
Owner

kryops commented Oct 15, 2019

Interestingly, I could also reproduce the same problem on a current Chrome for Android - something must have changed in the way pointer events and mouse/touch events correspond to each other when preventDefault() is called.

iOS 13 brought support for pointer events, so that would explain why the upgrade changed its behavior.

@ambiguousFoo could you try out v4.2.1 and check if that fixes the problem for you? I added some logic to attach mouse and touch event handlers only if the device does not support pointer events.

@trockets
Copy link
Author

Thankyou @kryops , your commit fixed my issue. Everything works great!

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

2 participants