Skip to content

Conversation

pascalbaljet
Copy link
Member

This PR ensures scroll regions are properly restored after navigation when preserveScroll is set to true.

Previously, the scroll regions were being reset because their DOM elements are destroyed and recreated during component swap. This fix captures scroll positions before the swap and restores them afterward. Document scroll doesn't require explicit restoration as the document element itself persists between navigations.

Fixes #2114.

@pascalbaljet pascalbaljet merged commit 7c6a086 into master Oct 9, 2025
12 checks passed
@pascalbaljet pascalbaljet deleted the store-scroll-on-redirect branch October 9, 2025 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

preservScroll in scroll-region not working

1 participant