Repository navigation
Conversation
A scroll read between the scroller resizing and TanStack's ResizeObserver callback paired the new scrollTop with the old height, briefly reporting the reader had left the bottom. Fixes the #35449 flake.
Member
Author
|
I've added an upstream fix for this instead(TanStack/virtual#1378) and created a PR bump tanstack and add it to the patch. |
langleyd
added a commit
that referenced
this pull request
Nov 9, 2026
When the timeline gets taller the browser moves scrollTop and fires the scroll event before TanStack's ResizeObserver has seen the new height, so an update could pair the new position with the old height and report leaving the bottom (#35449). Our virtual-core patch now reads the size along with the scroll event (TanStack/virtual#1378), and a shrink seen that way still keeps the end in view. The test is #35727's, which passes without that PR's hold in the view.
langleyd
added a commit
that referenced
this pull request
Nov 9, 2026
When the timeline gets taller the browser moves scrollTop and fires the scroll event before TanStack's ResizeObserver has seen the new height, so an update could pair the new position with the old height and report leaving the bottom (#35449). Our virtual-core patch now reads the size along with the scroll event (TanStack/virtual#1378), and a shrink seen that way still keeps the end in view. The test is #35727's, which passes without that PR's hold in the view.
rbondesson
pushed a commit
to ZacksBot/element-web
that referenced
this pull request
Nov 13, 2026
…atch (element-hq#35743) * Compensate rows that grow above the new timeline while scrolling up TanStack skips the scroll correction for a row that changes height again after it was measured while the user scrolls up (TanStack/virtual#1168), so an image or link preview finishing loading above the viewport shoved the rows on screen. Our virtual-core patch removed that skip; use the escape hatch TanStack provides for it instead, keeping the rest of its default rule. * Update TanStack Virtual to 3.19.11 Rebases our virtual-core patch. Two of its hunks are covered upstream now (a resize while a scroll is being written builds on the written position) and the backward-scroll one is replaced by TanStack's escape hatch in the view, so they are dropped. The two that remain: isValidAnchorItem, and keeping the end in view when the scroller shrinks (TanStack/virtual#1298, with the review changes). * Read the scroller's size with each scroll event in the new timeline When the timeline gets taller the browser moves scrollTop and fires the scroll event before TanStack's ResizeObserver has seen the new height, so an update could pair the new position with the old height and report leaving the bottom (element-hq#35449). Our virtual-core patch now reads the size along with the scroll event (TanStack/virtual#1378), and a shrink seen that way still keeps the end in view. The test is element-hq#35727's, which passes without that PR's hold in the view.
This branch was successfully deployed
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.
Fixes #35449.
When the window is resized, TanStack can read the new scroll position before its ResizeObserver callback has given it the new viewport height. That makes TimelineView briefly report the reader as no longer at the bottom, which flashes the jump-to-bottom button and made the resize test flaky.
TimelineView now holds back an at-bottom change until TanStack’s height matches the scroller’s real height. Added a test to trigger the issue deterministically.
I(using claude) was able to reproduce the flake a couple of times by applying a lot of cpu throttling. Then did a load of runs with the fix applied and it seems to fix it.
AI assistance