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

Scrollview with buttons in Chromebook triggers an "Intervention" warning #1251

Open
dlgski opened this issue Dec 7, 2020 · 2 comments
Open
Labels

Comments

@dlgski
Copy link

dlgski commented Dec 7, 2020

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
Copy link
Contributor

fbartho commented Dec 7, 2020

That sounds like a good fix!

@fbartho fbartho added the bug label Dec 7, 2020
@dlgski
Copy link
Author

dlgski commented Dec 7, 2020

In src/web/Button.tsx line 282 in the _onTouchEnd method, add a check for e.cancelable:

if ('touches' in e && e.cancelable) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants