Smooth scrolling not working properly
Moritz-Deiaco opened this issue · comments
Describe the bug
Lenis is behaving really strange: if I scroll, theres a "timeout" and then it scrolls instantly to the position where i scrolled.
To Reproduce
I tried to reproduce the steps in codepen, but strangely, it does works there
https://github.com/studio-freight/lenis/assets/101179677/b8ee2290-ef1f-426d-b0a1-4c658c4c8dc4
^Heres A Demo Video^
Thanks for your Help
I used the boilerplate code provided in README.md
I'm pretty sure you still have scroll-behavior: smooth ?
https://github.com/studio-freight/lenis?tab=readme-ov-file#recommended-css
Thanks, it works now
Im sorry to bother again, but now, the smooth scrolling to a #anchor my site is not working anymore. Is there any way to fix this?
I also tried this onclick fix, it did not work:
<a href="#about" onclick="lenis.scrollTo('#about')" class="active" >About Me</a >
do a codepen
On the codepen, it fixes it, but on my code, it doesnt, is there a problem with my css maybe?