Skip to content

Commit 0dce221

Browse files
authoredMay 21, 2023
lostPointerCapture event cancels pinch gestures (#599)
1 parent 4dcbf8c commit 0dce221

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed
 

‎.changeset/neat-planets-enjoy.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@use-gesture/core': patch
3+
---
4+
5+
detect lost pointer capture in PinchEngine

‎packages/core/src/engines/PinchEngine.ts

+2
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,8 @@ export class PinchEngine extends Engine<'pinch'> {
301301
bindFunction(device, 'end', this[device + 'End'].bind(this))
302302
// @ts-ignore
303303
bindFunction(device, 'cancel', this[device + 'End'].bind(this))
304+
// @ts-ignore
305+
bindFunction('lostPointerCapture', '', this[device + 'End'].bind(this))
304306
}
305307
// we try to set a passive listener, knowing that in any case React will
306308
// ignore it.

0 commit comments

Comments
 (0)
Please sign in to comment.