From 61d5dc28729da23922d0458d2ac34a61f0531a78 Mon Sep 17 00:00:00 2001 From: Sebastian Sebbie Silbermann Date: Wed, 11 Feb 2026 20:00:18 +0100 Subject: [PATCH 1/2] [test] Ensure new deploy test builds have the necessary env variables From c9030829a794b50ee6a34c9776d828691ecf8921 Mon Sep 17 00:00:00 2001 From: Sebastian Sebbie Silbermann Date: Wed, 27 Aug 2025 16:50:20 +0200 Subject: [PATCH 2/2] Cleanup scroll and focus restoration in layout router --- .../next/src/client/components/layout-router.tsx | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/packages/next/src/client/components/layout-router.tsx b/packages/next/src/client/components/layout-router.tsx index f88fd59d67e8..a02fe219489d 100644 --- a/packages/next/src/client/components/layout-router.tsx +++ b/packages/next/src/client/components/layout-router.tsx @@ -127,7 +127,7 @@ interface ScrollAndFocusHandlerProps { } class InnerScrollAndFocusHandler extends React.Component { handlePotentialScroll = () => { - // Handle scroll and focus, it's only applied once in the first useEffect that triggers that changed. + // Handle scroll and focus, it's only applied once. const { focusAndScrollRef, segmentPath } = this.props if (focusAndScrollRef.apply) { @@ -192,7 +192,7 @@ class InnerScrollAndFocusHandler extends React.Component { // In case of hash scroll, we only need to scroll the element into view if (hashFragment) { - ;(domNode as HTMLElement).scrollIntoView() + domNode.scrollIntoView() return } @@ -202,7 +202,7 @@ class InnerScrollAndFocusHandler extends React.Component