@@ -274,10 +274,13 @@ export class Lenis {
274274 // return
275275 // }
276276
277+ const isClickOrTap = deltaX === 0 && deltaY === 0
278+
277279 const isTapToStop =
278280 this . options . syncTouch &&
279281 isTouch &&
280282 event . type === 'touchstart' &&
283+ isClickOrTap &&
281284 ! this . isStopped &&
282285 ! this . isLocked
283286
@@ -286,8 +289,6 @@ export class Lenis {
286289 return
287290 }
288291
289- const isClick = deltaX === 0 && deltaY === 0 // click event
290-
291292 // const isPullToRefresh =
292293 // this.options.gestureOrientation === 'vertical' &&
293294 // this.scroll === 0 &&
@@ -298,7 +299,7 @@ export class Lenis {
298299 ( this . options . gestureOrientation === 'vertical' && deltaY === 0 ) ||
299300 ( this . options . gestureOrientation === 'horizontal' && deltaX === 0 )
300301
301- if ( isClick || isUnknownGesture ) {
302+ if ( isClickOrTap || isUnknownGesture ) {
302303 // console.log('prevent')
303304 return
304305 }
@@ -360,7 +361,7 @@ export class Lenis {
360361
361362 event . preventDefault ( )
362363
363- const syncTouch = isTouch && this . options . syncTouch
364+ const isSyncTouch = isTouch && this . options . syncTouch
364365 const isTouchEnd = isTouch && event . type === 'touchend'
365366
366367 const hasTouchInertia = isTouchEnd && Math . abs ( delta ) > 5
@@ -371,9 +372,10 @@ export class Lenis {
371372
372373 this . scrollTo ( this . targetScroll + delta , {
373374 programmatic : false ,
374- ...( syncTouch
375+ ...( isSyncTouch
375376 ? {
376377 lerp : hasTouchInertia ? this . options . syncTouchLerp : 1 ,
378+ // immediate: !hasTouchInertia,
377379 }
378380 : {
379381 lerp : this . options . lerp ,
0 commit comments