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

Pointer events cancelled by touch-action on Chrome #2

Closed
apostolos opened this issue Feb 20, 2021 · 2 comments
Closed

Pointer events cancelled by touch-action on Chrome #2

apostolos opened this issue Feb 20, 2021 · 2 comments

Comments

@apostolos
Copy link

Pointer events (e.g. pointermove) are being cancelled by a browser's touch action. This breaks Chrome on Android (or desktop Chrome with touch simulation enabled).

An easy fix is to put the following property to the svg element:

touch-action: none;

Before

image

After

image

@steveruizok
Copy link
Owner

Dude, my hero. Just pushed! Could you confirm that it's working?

https://perfect-freehand-example.vercel.app/
https://biwyi.csb.app/

@apostolos
Copy link
Author

Works perfectly, thank you! 👍

(you should probably document the requirement, it's easy to miss if someone hasn't messed with pointer events before)

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