oliviertassinari/react-swipeable-views

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

Closed this issue · 0 comments

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