fix(gesture): release gesture when disabling (#19855)

fixes #19848
This commit is contained in:
Liam DeBeasi
2019-11-12 10:45:06 -05:00
committed by GitHub
parent b28cf02ef3
commit 21484f1f3a

View File

@@ -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);
},