Skip to content

Bug: <Link href="/"> no longer scrolls to top when navigating to same route #88030

@Kaushik7984

Description

@Kaushik7984

🐛 Bug: <Link href="/" /> does not scroll to top on same-route navigation

Description

In Next.js 14, clicking a <Link href="/" /> while already on the / route correctly scrolls the page back to the top.

After upgrading to Next.js 16.1.1, this behavior no longer works. The scroll position is preserved, and the page does not move to the top.

This appears to be a regression or an undocumented change in scroll restoration behavior.


Link to the code that reproduces this issue

https://github.com/Kaushik7984/scroll-bug-repro

To Reproduce

import Link from "next/link";

export default function Page() {
  return (
    <div>
      <div style={{ height: "200vh" }}>Scroll down</div>
      <Link href="/">Go Home</Link>
    </div>
  );
}
  • Steps to reproduce:
  1. Visit /
  2. Scroll down
  3. Click the Go Home link
  4. Page does not scroll to top

Current vs. Expected behavior

Expected Behavior

Clicking a link pointing to the current route (e.g. <Link href="/" /> when already on /) should scroll the page to the top, matching the behavior in Next.js 14.


Actual Behavior

In Next.js 16.1.1:

  • Clicking <Link href="/" /> while already on /
  • Does not scroll to the top
  • Scroll position remains unchanged

Provide environment information

### Environment

- **Next.js version:** 16.1.1
- **React version:** 19.2.3
- **React DOM version:** 19.2.3
- **Router:** App Router
- **Node.js:** 20.x
- **Package manager:** pnpm
- **OS:** Windows 11
- **Browser:** Chrome

---

### `package.json`


{
  "name": "scroll-bug-repro",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start",
    "lint": "eslint"
  },
  "dependencies": {
    "next": "16.1.1",
    "react": "19.2.3",
    "react-dom": "19.2.3"
  },
  "devDependencies": {
    "@tailwindcss/postcss": "^4",
    "@types/node": "^20",
    "@types/react": "^19",
    "@types/react-dom": "^19",
    "eslint": "^9",
    "eslint-config-next": "16.1.1",
    "tailwindcss": "^4",
    "typescript": "^5"
  }
}

Which area(s) are affected? (Select all that apply)

Linking and Navigating

Which stage(s) are affected? (Select all that apply)

next dev (local)

Additional context

Additional Context

  • This behavior worked correctly in Next.js 14 without any custom scroll handling.
  • The issue occurs when navigating to the same route (/ → /) using <Link />.
  • This is commonly needed for persistent navigation UIs such as:
    • Bottom navigation bars
    • Dock-style navigation
    • Fixed headers / footers
  • The navigation component remains mounted between navigations.
  • Setting scroll={true} on <Link /> does not restore the previous behavior.
  • Manually calling window.scrollTo(0, 0) resolves the issue but feels like a workaround.
  • No related breaking change or migration note was found in the Next.js 15/16 documentation.

This makes it difficult to implement expected UX patterns where re-clicking the active route should reset scroll position.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Linking and NavigatingRelated to Next.js linking (e.g., <Link>) and navigation.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions