-
Notifications
You must be signed in to change notification settings - Fork 63
Refactor touch event listeners to prevent page scrolling on touch move #378
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
Refactor touch event listeners to prevent page scrolling on touch move #378
Conversation
Updated touch event listeners to use passive options and prevent default behavior on touchmove.
Added stopImmediatePropagation to touchmove event.
Refactor touchmove event listener to simplify event handling.
|
tested on my tablet, is working as expected! |
|
We may want to do the same for the non-offscreen canvas |
| } | ||
| } | ||
| async function sendTouchEvent(event: TouchEvent): Promise<void> { | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you be able to make sure the non-offscreen canvas does that as well?
We may want to refactor a bit to share more logic on this. But maybe not as this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Jeah I can add that later today -- need to go afk for ~2h
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I'm in no hurry
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
martinRenou
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Updated touch event listeners to use passive options and prevent default behavior on touch-events
Needs to be tried on readthedocs once its ready