mirror of
https://github.com/google/blockly.git
synced 2025-12-15 22:00:07 +01:00
fix: handle pointercancel only for drags (#9373)
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user