lenis icon indicating copy to clipboard operation
lenis copied to clipboard

On touch device, scroll event direction is set to 0 instead of 1 or -1

Open Charlene-Bx opened this issue 2 years ago • 5 comments
trafficstars

Describe the bug On Desktop device, the parameter "direction" in the scroll listener is set to 1 for a scroll up and -1 for a scroll down. Even with a pad. But on Touch device as Iphone or Ipad, the direction is always set to 0. No way to know if the user swipe from the top to the bottom or reverse...

Charlene-Bx avatar Jan 25 '23 21:01 Charlene-Bx

which version of lenis are you using ?

clementroche avatar Jan 25 '23 21:01 clementroche

@clementroche Lenis "^0.2.10"

Charlene-Bx avatar Jan 26 '23 08:01 Charlene-Bx

Try 0.2.28

clementroche avatar Jan 26 '23 11:01 clementroche

Hello @clementroche - I'm using 0.2.28 and encountering the same issue, direction property is always returning 0 on touch devices.

zulik-digital avatar Feb 02 '23 13:02 zulik-digital

You can try using 1.0.0-dev.5

clementroche avatar Feb 03 '23 10:02 clementroche

any news @Charlene-Bx, does that fix your issue ?

clementroche avatar Feb 08 '23 11:02 clementroche

1.0.0-dev.5 works for me, thanks @clementroche!

zulik-digital avatar Feb 08 '23 11:02 zulik-digital

1.0.0-dev.8 is available

clementroche avatar Feb 08 '23 12:02 clementroche