lenis icon indicating copy to clipboard operation
lenis copied to clipboard

reload from to top?

Open heyadeivan opened this issue 3 years ago • 1 comments

How do I do it when I reload doesn't save the scroll position, I want to start from the beginning/top

heyadeivan avatar Sep 22 '22 00:09 heyadeivan

Do you want to reset scroll position on page change ? If you want to I advice you to destroy lenis before page destroy and recreate it on page create right after you called window.scrollTo(0,0)

clementroche avatar Sep 23 '22 12:09 clementroche

in my case setting scroll-restoration to "manual" helped.

sushanyadav avatar Jun 15 '23 08:06 sushanyadav