mirror of
https://github.com/block/buzz.git
synced 2026-11-27 11:41:21 +00:00
Keep channel virtualizer API registered
Channel-keyed timeline mounts register the child virtualizer API before the parent layout effect runs. Do not immediately erase that registration, or deep-link navigation can never initialize its scroll owner. Co-authored-by: Carl <c7ebe626f000404285d3686e1dc74cc07cc60a9754a150041ba132e14bd3e2ec@buzz.block.builderlab.xyz> Signed-off-by: Wes <wesbillman@users.noreply.github.com>
This commit is contained in:
@@ -265,7 +265,10 @@ const MessageTimelineBase = React.forwardRef<
|
||||
if (!useTimelineVirtualizer) {
|
||||
setVirtualizerScrollParent(scrollContainerRef.current);
|
||||
}
|
||||
setTimelineVirtualizerApi(null);
|
||||
// Do not clear the child-registered virtualizer API here. This parent
|
||||
// layout effect runs after child layout effects on a keyed channel mount;
|
||||
// clearing it would leave target navigation waiting forever for APIs that
|
||||
// the still-mounted child will not register again.
|
||||
}, [scrollContainerRef, scrollContainerDomKey]);
|
||||
|
||||
const hasPersistentIntro =
|
||||
|
||||
Reference in New Issue
Block a user