AI & Agent Dev Bug Sandbox logo
AI & Agent Dev Bug Sandbox
Back to Radar

Scroll Reset Regression With Parallel Routes And Fixed-Position Slots Due To AppNewScrollHandler Default Change In Next.Js 16.3.0

In Next.js 16.3.0, the experimental.appNewScrollHandler default changed from false to true, causing navigation to not reset scroll position when a parallel route slot renders only a position: fixed element. The new scroll handler incorrectly treats the fixed element as a valid scroll target, preventing the actual page content from scrolling to top.

highConfidence 95%Next.jsRoute HandlersPages RouterAffected V16.3.0

Origin Analysis

The new scroll handler (InnerScrollHandlerNew) lacks the shouldSkipElement check that the old handler (InnerScrollHandlerOld) used to skip fixed/sticky positioned elements. When a parallel route slot renders only a fixed header, the Fragment ref passed to getScrollTargetState returns a small positive elementTop, causing initialTargetState to always be 1 ('already in viewport'). The handler then marks the shared scrollRef as handled and returns without scrolling, so the actual content slot never gets a chance to scroll.
1. Create a Next.js app with a parallel route slot (@header) that renders only a position: fixed element, e.g. <header className="fixed top-2">...</header> in @header/page.tsx. 2. Run pnpm dev, open the home page, scroll down about 2000px. 3. Click a <Link> to another page (e.g. /about). 4. Observe that the new page opens at the previous scroll offset instead of resetting to top.

Fixing Code Block

Edge Case Audit

The fix may affect other navigation scenarios where a slot contains both fixed and normal elements; regression testing is recommended for all parallel routes and scroll behavior. If issues arise, the temporary workaround is to set experimental.appNewScrollHandler: false in next.config.ts. For rollback, revert this code change and restore the previous behavior.

Ecosystem Topology

Agent Frameworks

LangChain, LlamaIndex, and Pydantic

  1. highProperty graph relation keys collide when entity IDs or labels contain underscores
  2. highCodeActAgent drops assistant tool-call metadata during handoff, leaving an orphan tool response
  3. high[Bug]: HierarchicalNodeParser async methods return the documents unsplit
  4. highLLM.predict_and_call fails with ValidationError for non-function-calling models when react_chat_formatter is omitted
  5. highAnthropic streaming server-tool input_json_delta overwrites completed client tool_use arguments due to stale cur_tool_call state