Repository navigation
Fix QuickGrid End-mode async-provider prepend viewport drift - #67938
Merged
Merged
Conversation
ilonatommy
temporarily deployed
to
copilot-pat-pool
July 21, 2026 15:04 — with
GitHub Actions
Inactive
ilonatommy
temporarily deployed
to
copilot-pat-pool
July 21, 2026 15:04 — with
GitHub Actions
Inactive
Contributor
There was a problem hiding this comment.
Pull request overview
Extends the existing Virtualize/QuickGrid manual scroll-anchoring safeguards to AnchorMode.End to prevent viewport drift during async-provider prepends (particularly for table-based QuickGrid on Blazor Server).
Changes:
- In
Virtualize.cs, defers clearing_pendingAnchorRestoreforEndmode so spacer callbacks can’t revert the prepend during the async restore round-trip. - In
Virtualize.ts, skips capturing transient “loading-gap” anchor snapshots forEndmode (same guard previously applied toNone/Start). - In
VirtualizationTest.cs, re-enables previously-disabled QuickGridEnd+ async provider test variants.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/Components/Web/src/Virtualization/Virtualize.cs | Extends anchor-restore deferral logic to cover End mode during async restore. |
| src/Components/Web.JS/src/Virtualize.ts | Avoids replacing stable anchor snapshots with transient “loading gap” snapshots in End mode. |
| src/Components/test/E2ETest/Tests/VirtualizationTest.cs | Re-enables End-mode async-provider E2E coverage now that the drift fix is in place. |
dariatiurina
approved these changes
Jul 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Follow-up to #67931 (
AnchorMode.None) and #67935 (AnchorMode.Start), extending the same fix toAnchorMode.End. Contributes to #67865.The problem
QuickGridrenders as a<table>, soVirtualizeuses manual JS scroll compensation. On Blazor Server the anchor restore is an async round-trip, and during that latency two things went wrong inEndmode (same failures already fixed forNone/Start):The fix
Extend the two existing guards to
End: hold_pendingAnchorRestoreacross the round-trip (Virtualize.cs) and skip the transient loading-gap snapshot (Virtualize.ts).The key difference from
Start:Endneeds no "not at top" gate. Start must converge to the new first item on a top prepend (so #67935 gates it with_deferPrependAnchorClear/!convergingToTop).Endanchors the current row at every position and never anchors an append (ShouldAnchorForAppendexcludesEnd), so its deferral is unconditional. Uses the bitmask form to match convention and coverStart | End.New QuickGrid AnchorMode test coverage summary, updated
None_AsyncProvider[Fact])