Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
fix(vue-app): use browser to handle scrolling position on page reload #5080
also for cases when returning to a nuxt site using a back button.
Types of changes
When leaving the page, the scrollRestoration is restored to 'auto', as this will instruct the browser to memorize the scroll position. vue-router will not restore the scroll position on page reload and when navigating back from a different page.
It solves the problem that the browser scrolls to the top when reloading a Nuxt page, as seen in Chrome for example with https://blog.lichter.io/.