From af3ca89d29e5a9898497f630f6725e0e64dfe903 Mon Sep 17 00:00:00 2001 From: Amirreza Zarkesh <56929398+ARZarkesh@users.noreply.github.com> Date: Sat, 22 Apr 2023 12:30:47 +0330 Subject: [PATCH] fix(useSwipe): ignore multiple touches (#2996) Co-authored-by: Anthony Fu --- packages/core/useSwipe/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/core/useSwipe/index.ts b/packages/core/useSwipe/index.ts index abd20b5bd66..dbdd26ebab4 100644 --- a/packages/core/useSwipe/index.ts +++ b/packages/core/useSwipe/index.ts @@ -137,6 +137,8 @@ export function useSwipe( }, listenerOptions), useEventListener(target, 'touchmove', (e: TouchEvent) => { + if (e.touches.length !== 1) + return const [x, y] = getTouchEventCoords(e) updateCoordsEnd(x, y) if (!isSwiping.value && isThresholdExceeded.value)