Version
1.0.0-rc3
Reproduction link
https://github.com/krestaino/scroll-position-nuxt
Steps to reproduce
- Go to http://localhost:3000/
- Scroll down and click on a post
- After the new page loads, use the browser's back button
- Scroll position goes to the top rather than where it was
What is expected?
Navigating back should retain the scroll position.
What is actually happening?
Navigating back does not retain the scroll position.
Additional Info
One thing I noticed, if I set the height of the HTML element to something like html { min-height: 10000px }
, the issue goes away. It doesn't seem to be 100% consistent though. Is this happening because the post list is being rendered dynamically using v-for
?
<!-- generated by vue-issues. DO NOT REMOVE --><!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This bug report is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c1040">#c1040</a>)</em></sub></div>