mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
8ec0d1eee8
When scrollPositionRestoration is enabled and the app hydrates an SSR-rendered page, RouterScroller was unconditionally scrolling the viewport to [0, 0] on the first imperative navigation. This discards any scroll position the user established while the server-rendered page was loading. Fix by injecting IS_HYDRATION_DOM_REUSE_ENABLED into RouterScroller and suppressing the scroll-to-top for the initial navigation only. Subsequent navigations are unaffected. Closes #64578
Angular
The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.
Usage information and reference details can be found in Angular documentation.
License: MIT