fix(picker-column): add cancelable check to avoid intervention error in chrome (#22140)

resolves #22137
This commit is contained in:
Liam DeBeasi 2020-09-22 14:04:39 -04:00 committed by GitHub
parent 68afc49e9e
commit a24a041064
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -250,7 +250,9 @@ export class PickerColumnCmp implements ComponentInterface {
// We have to prevent default in order to block scrolling under the picker
// but we DO NOT have to stop propagation, since we still want
// some "click" events to capture
detail.event.preventDefault();
if (detail.event.cancelable) {
detail.event.preventDefault();
}
detail.event.stopPropagation();
hapticSelectionStart();
@ -272,7 +274,9 @@ export class PickerColumnCmp implements ComponentInterface {
}
private onMove(detail: GestureDetail) {
detail.event.preventDefault();
if (detail.event.cancelable) {
detail.event.preventDefault();
}
detail.event.stopPropagation();
// update the scroll position relative to pointer start position