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

Merged

Conversation

erickreutz
Copy link
Contributor

@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()
Copy link

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@erickreutz
Copy link
Contributor Author

not state

@gorhom gorhom self-assigned this May 18, 2025
@gorhom gorhom added the v5 label May 18, 2025
@gorhom
Copy link
Owner

gorhom commented May 18, 2025

thanks @erickreutz for submitting this PR

@gorhom gorhom merged commit 14d5d1e into gorhom:master May 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants