Tour the Atmosphere. Switch clients, share universal links, browse any PDS.

PageTransition: restore scroll-to-top with behavior: 'instant' master

Re-adds the post-navigation scroll reset that was dropped in the softer-transition rework. The previous version was vulnerable to a race anyway: globals.css sets scroll-behavior: smooth on <html> for in-page anchor scrolling, and the default scrollTo form inherits that — so the cross-page jump turned into a tween that the AnimatePresence mode="popLayout" layout shift could clamp partway up, landing users on a long account page partway up the new (shorter) collection page instead of at the top. Fix: pass behavior: 'instant' explicitly so the navigation jump always runs synchronously, regardless of CSS. Hash navigations still skip the reset so in-page anchors keep working.


+18 -1
1 changed file