Closed ali4zimi closed 1 year ago
Thanks @ali4zimi
Why using the localStorage since the navigation is on client-side actually, why not using a variable in memory instead?
Thanks, @Atinux for reviewing it, I assumed when the user refreshes on the next page, the variable in the memory would be cleared.
If he refreshed the browser will respect the position normally.
I actually wrote a library with @posva about this yesterday coincidentally https://github.com/antfu/vue-router-better-scroller
Thank you! Please check https://github.com/nuxt/movies/commit/83d466e54794ffa20ba14ae54526c0278e656fdb instead.
Thanks, great library! I needed this for one of my own projects.
I used
localstorage
to store previous pages with their scroll position. When the user presses the back button they will be at the same location where they left off. I worked on this solution today and it works now. Please check it once more