Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Navigating back should retain the scroll position. #1669

Closed
krestaino opened this issue Aug 5, 2017 · 2 comments
Closed

Navigating back should retain the scroll position. #1669

krestaino opened this issue Aug 5, 2017 · 2 comments

Comments

@krestaino
Copy link

krestaino commented Aug 5, 2017

Version

2.7.0

Reproduction link

https://github.com/krestaino/nuepress

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.

Related Issues

nuxt/nuxt#1036
#1373

nuxt/nuxt#1182 (this issue on nuxt/nuxt.js)


Is this a vue-router or Nuxt.js issue?

One thing I noticed, if I set the height of the HTML element to something like html { min-height: 10000px }, the issue goes away. Is this happening because the post list is being rendered dynamically using v-for?

@posva
Copy link
Member

posva commented Aug 5, 2017

Please, check if this hasn't been reported already. It looks related to #1263
Next time, please make sure to provide a minimal repro using the fiddle of the vue issue helper, otherwise I won't be able to check it

@posva posva closed this as completed Aug 5, 2017
@krestaino
Copy link
Author

Yeah sorry, I figured out the issue is with Nuxt.js and it has nothing to do with vue-router. I've reported it over there.

I'll make sure to isolate the issue next time and apologizes for the inconvenience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants