fix: handle pointercancel only for drags (#9373)

This commit is contained in:
Maribeth Moffatt
2025-09-19 13:53:57 -07:00
committed by GitHub
parent 7274f4babb
commit 139fa2b3f2
2 changed files with 9 additions and 1 deletions

View File

@@ -467,6 +467,15 @@ export class Gesture {
/* opt_noCaptureIdentifier */ true,
),
);
this.boundEvents.push(
browserEvents.conditionalBind(
document,
'pointercancel',
null,
this.handleUp.bind(this),
/* opt_noCaptureIdentifier */ true,
),
);
e.preventDefault();
e.stopPropagation();

View File

@@ -46,7 +46,6 @@ export const TOUCH_MAP: {[key: string]: string[]} = {
'mouseup': ['pointerup', 'pointercancel'],
'touchend': ['pointerup'],
'touchcancel': ['pointercancel'],
'pointerup': ['pointerup', 'pointercancel'],
};
/** PID of queued long-press task. */