Static GitHub Issues

[1182] Navigating back should retain the scroll position.

prev: "~components/Logo.vue" dependency was not found!
next: Middleware in client side: context.app is undefined (1.0.0 rc2)

Version

1.0.0-rc3

Reproduction link

https://github.com/krestaino/scroll-position-nuxt

Steps to reproduce

  1. Go to http://localhost:3000/
  2. Scroll down and click on a post
  3. After the new page loads, use the browser's back button
  4. 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>