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 to a new route or different query params does not scroll to top #15356

Closed
chrisnoden opened this issue Nov 4, 2022 · 6 comments
Closed

Comments

@chrisnoden
Copy link

Environment

  • Operating System: Darwin
  • Node Version: v16.17.0
  • Nuxt Version: 3.0.0-rc.13
  • Nitro Version: 0.6.1
  • Package Manager: yarn@1.22.19
  • Builder: vite
  • User Config: nitro
  • Runtime Modules: -
  • Build Modules: -

Reproduction

https://github.com/chrisnoden/nuxt3-bug

In short. Create a project with only nuxt rc.13 as a dependency.
Create a couple of pages which are longer than the viewable height of the browser. Put links to the pages down below the fold.

Scroll down to click on one of the links. The new page loads but the scroll position is still at the bottom of the page. This is not what anyone expects when navigating to a new "page". Scroll position should only be controlled by inclusion of a # in the URL typically.

This bug has been around since rc.7 at least.

Describe the bug

The user expects when clicking a link to a new "page" that the page will appear with the scroll position at the top of the page. For example, if you have a long page and click on a link in the footer, you may not notice the page content has changed because you can still only see the footer.

Additional context

No response

Logs

No response

@chrisnoden
Copy link
Author

Linked to nuxt/framework#8327 and #14544

@richgcook
Copy link

Why was this closed?

@danielroe
Copy link
Member

@richgcook
Copy link

Thanks @danielroe – so this would be merged in rc14 or stable?

@danielroe
Copy link
Member

Yes 👍

@manniL
Copy link
Member

manniL commented Nov 7, 2022

@richgcook And you can try it out on the edge channel already!

@danielroe danielroe added the 3.x label Jan 19, 2023
@danielroe danielroe transferred this issue from nuxt/framework Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants