nextjs - 💡(How to fix) Fix `refresh()` scroll regression introduced in 16.1.1-canary.28, still present on next@canary, works fine on 16.1.6 [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vercel/next.js#91322Fetched 2026-04-08 02:02:16
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Author
Timeline (top)
labeled ×2closed ×1commented ×1issue_type_added ×1

Code Example

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 25.3.0: Wed Jan 28 20:51:28 PST 2026; root:xnu-12377.91.3~2/RELEASE_ARM64_T6041
  Available memory (MB): 131072
  Available CPU cores: 16
Binaries:
  Node: 22.22.0
  npm: 10.9.4
  Yarn: 1.22.22
  pnpm: 9.15.9
Relevant Packages:
  next: 16.2.0-canary.95 // Latest available version is detected (16.2.0-canary.95).
  eslint-config-next: N/A
  react: 19.2.3
  react-dom: 19.2.3
  typescript: 5.9.3
Next.js Config:
  output: N/A
RAW_BUFFERClick to expand / collapse

Link to the code that reproduces this issue

https://github.com/stipsan/nextjs-refresh-regression-repro

To Reproduce

The repo README has instructions on how to repro locally. When clicking the "Refresh" button at the bottom of the viewport it should refresh in place. Since 16.1.1-canary.28 it has started scrolling the page to the top.

I've deployed examples of the expected behavior here:

And "current", assuming it'll continue to happen when next@canary graduates to v16.2.0

Current vs. Expected behavior

https://github.com/user-attachments/assets/0b13f405-f566-47c6-b9c2-3a6514ebc1c8

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 25.3.0: Wed Jan 28 20:51:28 PST 2026; root:xnu-12377.91.3~2/RELEASE_ARM64_T6041
  Available memory (MB): 131072
  Available CPU cores: 16
Binaries:
  Node: 22.22.0
  npm: 10.9.4
  Yarn: 1.22.22
  pnpm: 9.15.9
Relevant Packages:
  next: 16.2.0-canary.95 // Latest available version is detected (16.2.0-canary.95).
  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)

Server Actions

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

next dev (local), Vercel (Deployed), Other (Deployed), next start (local)

Additional context

Related links for what changed between the last working canary and the first canary that broke it

extent analysis

TL;DR

Downgrade to [email protected] to avoid the scrolling issue when refreshing the page.

Guidance

  • Review the changes between v16.1.1-canary.27 and v16.1.1-canary.28 to identify the potential cause of the regression.
  • Test the application with different versions of next to confirm the issue is specific to versions after v16.1.1-canary.27.
  • Check the React and React DOM versions used in the application, as changes in these libraries may also be contributing to the issue.
  • Consider opening an issue with the Next.js team to report the regression and seek a permanent fix.

Notes

The provided links to the code and examples demonstrate the issue, but without further investigation, it's difficult to pinpoint the exact cause. Downgrading to a previous version may be a temporary workaround.

Recommendation

Apply workaround: Downgrade to [email protected] to avoid the scrolling issue, as this version is known to work as expected.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING