Scrollview with buttons in Chromebook triggers an "Intervention" warning
dlgski opened this issue · 2 comments
dlgski commented
Using touch events on a Chromebook to scroll a view that has buttons inside it, often triggers the button "onPress" event when it should be ignored due to scrolling.
A warning "Intervention" error is displayed in the console stating:
[Intervention] Ignored attempt to cancel a touchend event with cancelable=false, for example because scrolling is in progress and cannot be interrupted.
This is pointing to the touchEnd handling in Button.js.
To fix, seems like just an additional check on e.cancelable is all that is needed here before executing the press event methods.
fbartho commented
That sounds like a good fix!
dlgski commented
In src/web/Button.tsx
line 282 in the _onTouchEnd
method, add a check for e.cancelable
:
if ('touches' in e && e.cancelable) {