mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
When navigating to a route with a hash parameter, the layout router jumps to the element by scrolling to the node's `offsetTop` value. However, this will ignore `scroll-padding`, which deviates from browser behavior. It looks like this isn't an issue in the pages router which currently makes use of [`scrollIntoView`](https://github.com/vercel/next.js/blob/canary/packages/next/src/shared/lib/router/router.ts#L2262). Closes NEXT-1171 Fixes #49612 ---------