From 44fb159b63ada0c049f6a0b9ff23415f98b37a30 Mon Sep 17 00:00:00 2001 From: Maribeth Moffatt Date: Fri, 19 Sep 2025 12:37:59 -0700 Subject: [PATCH] fix: handle pointercancel only for drags --- core/gesture.ts | 9 +++++++++ core/touch.ts | 1 - 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/core/gesture.ts b/core/gesture.ts index 4c65c1d3842..fa3d8a15138 100644 --- a/core/gesture.ts +++ b/core/gesture.ts @@ -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(); diff --git a/core/touch.ts b/core/touch.ts index 9af3b1f9494..8fb2cd2298c 100644 --- a/core/touch.ts +++ b/core/touch.ts @@ -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. */