darkroomengineering / lenis

How smooth scroll should be
https://lenis.darkroom.engineering
MIT License
7.37k stars 317 forks source link

Page not scrolling all the way #202

Closed Fergie77 closed 12 months ago

Fergie77 commented 12 months ago

I've been having an issue where sometimes the page doesn't scroll all the way to the bottom. I've tried changing the wrapper from window to body and to the wrapper div for my page content. Nothing seems to help. It's an intermittent problem so I'm not quite sure how to replicate it, has anyone else encountered something similar?

Live site link is here https://nova-living-sandbox.webflow.io/

Just using the default setup code

import Lenis from '@studio-freight/lenis'

function scrollSpeed() {
  const lenis = new Lenis({
    wheelMultiplier: 0.5,
    duration: 0.5,
  })

  function raf(time) {
    lenis.raf(time)
    requestAnimationFrame(raf)
  }

  requestAnimationFrame(raf)
  lenis
}

export default scrollSpeed
Fergie77 commented 12 months ago

Just realised I was calling lenis twice, pretty sure that's the problem