lenis
lenis copied to clipboard
Different scroll speed on different browsers
Describe the bug While working with the library, I noticed that the scroll speed is very different across browsers. On Chrome the scroll is way slower than the scroll on Firefox. I was able to reproduce this issue in linux, mac and windows.
To Reproduce You can reproduce it in the official demo. While scrolling with the same speed you can see that on Firefox you will scroll way faster than on Chrome.
Which version of the lib are you using? Since v1 a normalizeWheel options has been introduced and should fix this kind of issues.
https://github.com/studio-freight/lenis/blob/main/README-v1.md#instance-settings
I'm using the latest 1.0.0-dev.8. The normalizeWheel option does not seem to do anything, same as in demo.
Are you using a trackpad or an actual mouse ?
Using a mouse each wheel is currently 100
@clementroche I'm on version 1.0.0-dev.7 and setting normalizeWheel does not seem to change anything. The current behavior (with 1.0.0-dev.7) seems to be the old one, where Chrome scrolls a lot further than Firefox.
Maybe it's a regression? I thought it really was fixed in an earlier version. :thinking:
Yes it has been fixed in the past @thasmo.
What's the value you get on Chrome ?
On my side Chrome deltaY is 100 with both normalizeWheel: true and normalizeWheel: false, Firefox is 100 with normalizeWheel: true and 102 on normalizeWheel: false. The only context where it can be an issue is when you wheel deltaY is < 100
@clementroche, nevermind - I'm not sure where I was looking at, but so far it seems to work fine with 1.0.0-dev.7, although I thought I was sure it wasn't. I guess I need to take a closer look at it anytime soon to figure out what was going on. For now I can't reproduce.
It seems, that the mentioned scroll behavior appears when we are using instance.stop() and instance.start().
Currently normalize wheel across browsers and OS seems impossible, everyone is using a different scroll device or configuration and it's impossible to detect such things
I still get this issue, even on your page (https://lenis.studiofreight.com/). Chrome scrolls further than Firefox. I get that it's nearly impossible to normalize this across all browser but from a library that headlines with Normalize all your User Inputs I actually expected this to work… As I understand there is currently no way to normalize this?
@sandrodunkel it's open source, if you find a solution I would be super happy to just merge your PR