Skip to content

Commit

Permalink
fix(useSwipe): ignore multiple touches (#2994)
Browse files Browse the repository at this point in the history
  • Loading branch information
ARZarkesh committed Apr 18, 2023
1 parent 2e16215 commit 995aadb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/core/useSwipe/index.ts
Expand Up @@ -126,6 +126,8 @@ export function useSwipe(

const stops = [
useEventListener(target, 'touchstart', (e: TouchEvent) => {
if (e.touches.length !== 1)
return
if (listenerOptions.capture && !listenerOptions.passive)
e.preventDefault()
const [x, y] = getTouchEventCoords(e)
Expand Down

0 comments on commit 995aadb

Please sign in to comment.