make sure cancelable is true before calling onPress for touchEnd event#1252
make sure cancelable is true before calling onPress for touchEnd event#1252dlgski wants to merge 1 commit intomicrosoft:masterfrom
Conversation
fbartho
left a comment
There was a problem hiding this comment.
This only resolves the console warning, right? There's no user-visible behavior changes other than that?
|
It fixes the conflict of scrolling and pressing on a button at the same time. So if you press & scroll the press action should not occur. Currently the press action does happen and this Intervention warning happens. With this in place, the press action will be suppressed if you are scrolling and no Intervention warning is displayed. This occurs on a touchscreen device like a Chromebook. ref: https://developer.mozilla.org/en-US/docs/Web/API/Event/cancelable
|
|
hi @fbartho do you need anything more for this PR? Is there a plan to get it merged? ty! |
Issue #1251
When you have buttons within a ScrollView, and on a Chromebook you press on one of those buttons and drag your finger up or down to scroll. It should not trigger the onPress event.
What is currently happening is the press event is triggered and an Intervention warning is displayed in the console:
[Intervention] Ignored attempt to cancel a touchend event with cancelable=false, for example because scrolling is in progress and cannot be interrupted.What needs to done to fix this is to make sure onTouchEnd the event is cancelable before triggering the onPress event actions.
This PR simply adds this check.