Enhanced navigation should not scroll before content renders #64054
+3
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Prevent visual flash during navigation
This is a timing bug, specially visible on browsers with slower connection or when the page intentionally delays rendering. Because enhanced page load fetches and applies the new DOM asynchronously, the immediate scroll-up run against the previous page's DOM. User sees a page A jump to the top and only after the fetch of new page is completed - the page B replaces it.
The fix is to defer the scroll until the first DOM update. Enhanced page load method has a callback to
documentUpdated
. The fix is to move the scrolling logic to the document updated callback.Description
performEnhancedPageLoad
todocumentUpdated
callback.Fixes #64015