Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different scroll speed on different browsers #131

Open
KarolisVaitiekunas11 opened this issue Mar 7, 2023 · 11 comments
Open

Different scroll speed on different browsers #131

KarolisVaitiekunas11 opened this issue Mar 7, 2023 · 11 comments
Labels

Comments

@KarolisVaitiekunas11
Copy link

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.

@clementroche
Copy link
Member

clementroche commented Mar 7, 2023

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

@KarolisVaitiekunas11
Copy link
Author

I'm using the latest 1.0.0-dev.8. The normalizeWheel option does not seem to do anything, same as in demo.

@clementroche
Copy link
Member

Are you using a trackpad or an actual mouse ?

@clementroche
Copy link
Member

Using a mouse each wheel is currently 100

@thasmo
Copy link

thasmo commented Mar 7, 2023

@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. 🤔

@clementroche
Copy link
Member

clementroche commented Mar 7, 2023

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

@thasmo
Copy link

thasmo commented Mar 9, 2023

@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.

@darius-kul
Copy link

It seems, that the mentioned scroll behavior appears when we are using instance.stop() and instance.start().

@clementroche
Copy link
Member

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

@sandrodunkel
Copy link

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?

@clementroche
Copy link
Member

@sandrodunkel it's open source, if you find a solution I would be super happy to just merge your PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants