Skip to content

Commit

Permalink
lostPointerCapture event cancels pinch gestures (#599)
Browse files Browse the repository at this point in the history
  • Loading branch information
ds300 committed May 21, 2023
1 parent 4dcbf8c commit 0dce221
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/neat-planets-enjoy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@use-gesture/core': patch
---

detect lost pointer capture in PinchEngine
2 changes: 2 additions & 0 deletions packages/core/src/engines/PinchEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,8 @@ export class PinchEngine extends Engine<'pinch'> {
bindFunction(device, 'end', this[device + 'End'].bind(this))
// @ts-ignore
bindFunction(device, 'cancel', this[device + 'End'].bind(this))
// @ts-ignore
bindFunction('lostPointerCapture', '', this[device + 'End'].bind(this))
}
// we try to set a passive listener, knowing that in any case React will
// ignore it.
Expand Down

0 comments on commit 0dce221

Please sign in to comment.