Skip to content

Conversation

ilonatommy
Copy link
Member

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

  • Move scroll from execution just after performEnhancedPageLoad to documentUpdated callback.

Fixes #64015

@ilonatommy ilonatommy self-assigned this Oct 15, 2025
@github-actions github-actions bot added the area-blazor Includes: Blazor, Razor Components label Oct 15, 2025
@ilonatommy ilonatommy added this to the 10.0.x milestone Oct 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-blazor Includes: Blazor, Razor Components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhanced navigation in .NET10: scroll happens before content renders, causing visual flash

1 participant