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

ISR generated dynamic pages doesn't scroll to top on route change #48868

Closed
1 task done
Farhaan9082 opened this issue Apr 26, 2023 · 6 comments
Closed
1 task done

ISR generated dynamic pages doesn't scroll to top on route change #48868

Farhaan9082 opened this issue Apr 26, 2023 · 6 comments
Labels
area: app App directory (appDir: true) bug Issue was opened via the bug report template.

Comments

@Farhaan9082
Copy link

Farhaan9082 commented Apr 26, 2023

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

Don't have my PC right now

Which area(s) of Next.js are affected? (leave empty if unsure)

App directory (appDir: true)

Link to the code that reproduces this issue

https://github.com/Farhaan9082/personal-website

To Reproduce

https://farhaan.vercel.app
In the above site, go to work in navbar to /projects and then click on any 1 project, it persists the scroll position while moving to projects/{id}

Describe the Bug

ISR generated dynamic pages on production persists scroll position on route change

Expected Behavior

Should scroll to top of the page on route change

Which browser are you using? (if relevant)

Brave

How are you deploying your application? (if relevant)

Vercel

@Farhaan9082 Farhaan9082 added the bug Issue was opened via the bug report template. label Apr 26, 2023
@github-actions github-actions bot added the area: app App directory (appDir: true) label Apr 26, 2023
@nowseemee
Copy link

@nowseemee
Copy link

this is fixed in the latest canary release 🎉

@Gawdfrey
Copy link

I am still experiencing this issue in the pages directory, even with the latest canary release.

@liho00
Copy link

liho00 commented May 17, 2023

me too

@timneutkens
Copy link
Member

In the App Router we've completely reworked how scrolling on navigation and on back navigation is applied to solve the longstanding issues pages had around this. I'm going to close this issue as it was confirmed the changes work and the reproduction is no longer available.

@github-actions
Copy link
Contributor

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: app App directory (appDir: true) bug Issue was opened via the bug report template.
Projects
None yet
Development

No branches or pull requests

5 participants