Skip to content

Commit

Permalink
fix(gesture): release gesture when disabling (#19855)
Browse files Browse the repository at this point in the history
fixes #19848
  • Loading branch information
liamdebeasi committed Nov 12, 2019
1 parent b28cf02 commit 21484f1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions core/src/utils/gesture/index.ts
Expand Up @@ -203,8 +203,12 @@ export const createGesture = (config: GestureConfig): Gesture => {

return {
enable(enable = true) {
if (!enable && hasCapturedPan) {
pointerUp(undefined);
if (!enable) {
if (hasCapturedPan) {
pointerUp(undefined);
}

reset();
}
pointerEvents.enable(enable);
},
Expand Down

0 comments on commit 21484f1

Please sign in to comment.