Skip to content

Link doesn't scroll to section anchor (by id) again #88986

@evgeniyworkbel

Description

@evgeniyworkbel

Link to the code that reproduces this issue

repo:
https://github.com/evgeniyworkbel/my-nextjs16-link-issue
deploy:
my-nextjs16-link-issue.vercel.app

To Reproduce

  1. Click link in footer to scroll to section
  2. See that page has scrolled to section
  3. Scroll manually by mouse to footer again
  4. Click link in footer again

Current vs. Expected behavior

Expected result: page will be scrolled to section
Actual result: nothing happened

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.5.0: Wed May  1 20:12:58 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6000
  Available memory (MB): 16384
  Available CPU cores: 10
Binaries:
  Node: 22.21.1
  npm: 10.9.4
  Yarn: 1.22.22
  pnpm: 9.15.3
Relevant Packages:
  next: 16.1.4 // Latest available version is detected (16.1.4).
  eslint-config-next: N/A
  react: 19.2.3
  react-dom: 19.2.3
  typescript: 5.9.3
Next.js Config:
  output: N/A

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

Linking and Navigating

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

next dev (local), Vercel (Deployed)

Additional context

No response

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