Closed TomSmedley closed 1 year ago
No issues on codepen, can you share your implementation ? @TomSmedley
Using Svelte I've done this in my +layout.svelte
onMount(() => {
const lenis = new Lenis();
function raf(time: number) {
if (lenis) {
lenis.raf(time);
requestAnimationFrame(raf);
}
}
requestAnimationFrame(raf);
return () => lenis.destroy();
});
Downgrading to 1.0.4 fixes this issue
Since it works on codepen, your implementation is wrong, maybe css or something ?
Interesting, what would make wrong from 1.0.4 to 1.0.5?
i don't know, can you share your website with 1.0.5 ?
Code reproduction: https://stackblitz.com/edit/sveltejs-kit-template-default-sgdgiv?file=src/routes/+layout.svelte
Screen record: https://www.loom.com/share/45ac8bc31d794fa1b17951615be58883
Seems to be related to lenis.scrollTo(0, { immediate: true })
in some way. Though I'm not 100%.
ok i can reproduce now, thank you
fixed in v1.0.6
No error is returned by the browser so it's a tough one, I've created a loom however and downgraded in the meantime.
https://www.loom.com/share/d1e2da8edec94c59bda732e24867fc41