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

touchmove event with cancelable=false in a webview may lead to warnings #521

Closed
1 task done
gaoupon opened this issue Jun 10, 2019 · 0 comments · Fixed by #524
Closed
1 task done

touchmove event with cancelable=false in a webview may lead to warnings #521

gaoupon opened this issue Jun 10, 2019 · 0 comments · Fixed by #524

Comments

@gaoupon
Copy link
Contributor

gaoupon commented Jun 10, 2019

touchmove event with cancelable=false in a webview may lead to warnings like:

[Intervention] Ignored attempt to cancel a touchmove event with cancelable=false, for example because scrolling is in progress and cannot be interrupted.

  • I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

check wether the event is cancelable

Current Behavior

no check and lead to warnings

Steps to Reproduce (for bugs)

  1. open the offical simple demo https://x8x11zjmp.codesandbox.io/ in Android webview

  2. swipe the slides (the error message may come out in the console)

Context

it works fine in the mobile chrome, but run into some problems in the Android webview, because the touchmove event may not be canceled.

i guess that has something to with:

// We are likely to be swiping, let's prevent the scroll event.
if (dx > dy) {
event.preventDefault();
}

and

// We are swiping, let's prevent the scroll event.
event.preventDefault();

without checking wether the event is cancelable, this issue cause unnecessary warnings.

Your Environment

Tech Version
react-swipeable-views 0.13.3
React ^16.8.6
platform mac os
@gaoupon gaoupon closed this as completed Jun 10, 2019
@gaoupon gaoupon changed the title touch event that fires out of container touchmove event with cancelable=false in a webview may lead to warnings Jun 10, 2019
@gaoupon gaoupon reopened this Jun 10, 2019
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 a pull request may close this issue.

1 participant