Skip to content

fix: prevent canceling touchmove events when not cancelable #2244

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

erickreutz
Copy link

@erickreutz erickreutz commented Apr 17, 2025

Description

This PR fixes warnings about attempting to cancel touchmove events with cancelable=false by adding checks for the event.cancelable property before calling preventDefault().

Details

The error 'Ignored attempt to cancel a touchmove event with cancelable=false, for example because scrolling is in progress and cannot be interrupted' occurs when the code tries to call preventDefault() on a touchmove event that has cancelable=false (which happens during active scrolling).

The fix adds event.cancelable checks in all three places where preventDefault() is called in the useScrollHandler.web.ts file.

Fix warnings about attempting to cancel touchmove events with cancelable=false by checking the event.cancelable property before calling preventDefault()
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.

1 participant