Repository navigation
fix(desktop): keep the timeline settle write out of the resize pass - #5771
Open
chessing234 wants to merge 2 commits into
Open
chessing234 wants to merge 2 commits into
chessing234 wants to merge 2 commits into
Conversation
`useVirtualizedViewportResize` called `settleAtBottom` synchronously from its ResizeObserver callback. That path runs `pinToBottom` -> `scrollToIndex`, which shifts Virtua's rendered range, re-measures rows and can toggle the scrollbar -- resizing the observed element at a deeper depth of the pass that is delivering to us. The browser detects the re-entrancy and logs "ResizeObserver loop completed with undelivered notifications" continuously on a live channel. Defer the settle to the next animation frame, mirroring the rAF defer the sibling observer in `useVirtualizedBottomSettle` already uses, and skip deliveries whose geometry is unchanged -- the callback took no `entries`, so a resize that round-tripped to the same layout still scrolled. Lift the callback into `createVirtualizedViewportResizeHandler` so the frame handling is testable without a DOM. Refs block#5717 Signed-off-by: Taksh <takshkothari09@gmail.com>
Signed-off-by: Taksh <takshkothari09@gmail.com>
🔐 Codex Security Review
|
This branch has not been 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.
Refs #5717.
A scroll write inside the viewport resize observer can re-measure virtualized rows and deliver another resize in the same pass. The browser then reports
ResizeObserver loop completed with undelivered notifications.Changes
Verification