Open Muljayan opened 3 years ago
Experiencing the same issue. would be nice to have a fix itself or suggestion of a possible workaround.
any fix yet?
this is a big issue
Does setting the scrollRestoration
experimental option make any difference?
module.exports = {
experimental: {
scrollRestoration: true,
},
};
Still buggy especially with fragment links (# anchors). Current state, see https://github.com/vercel/next.js/issues/37893#issuecomment-1382858670
The problem is still present in NextJs 13.4.12 appDir
.
Update: On IOS Chrome we cannot reproduce the issue. Only IOS Safari is reproducible.
I've reproduced the issue on almost all of my PWA apps on Chrome. Close to 20 of them. I cannot however reproduce this on Safari as of yet.
See: https://github.com/vercel/next.js/issues/37893#issuecomment-1619916412. I have a Next.js 14 App Router web app running without issues on any of the major browsers.
What version of Next.js are you using?
10.2.3
What version of Node.js are you using?
12.6.3
What browser are you using?
Chrome, Firefox
What operating system are you using?
Ubuntu 18.04
How are you deploying your application?
next start, next dev
Describe the Bug
This issue occurs when we return to a page which uses
getServerSideProps
with the back button. I tried it withgetInitialProps
and it works fine.Expected Behavior
The expected behavior is to go back to the previous scroll position after clicking the back button. This does not happen.
To Reproduce
index.js in the pages folder
[id.js] file in the pages/posts folder