fix: allow smooth scrolling if only hash changes (pages & app) (#52915)
We were preventing smooth scrolling to avoid jarring UX when `scroll-behavior: smooth` was set and the user navigates to another route ([PR](https://github.com/vercel/next.js/pull/40642) and [related comment](https://github.com/vercel/next.js/issues/51721#issuecomment-1623416600)). This updates both pages & app router to restore smooth scroll functionality if the only the route hash changes. Fixes #51721 Closes NEXT-1406
Showing
Please
register
or
sign in
to comment