Skip to content

Commit 1f7be4b

Browse files
committed
fix(web): clear the composer refold baseline when the timeline returns to the end
1 parent e26095a commit 1f7be4b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎apps/web/src/components/chat/useTimelineFollow.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,7 @@ export function useTimelineFollow(input: TimelineFollowInput) {
352352
viewportRef.current?.navigate({ releasesFollow: false });
353353
followStore.dispatch(visit, { type: "followEnd" });
354354
setReaderScrolledVisit(null);
355+
refoldFromRef.current = null;
355356
visitScroll().showScrollDebouncer.cancel();
356357
setShowScrollToBottom(false);
357358
setTimelineAnchor(releaseChatTimelineAnchor);
@@ -536,6 +537,7 @@ export function useTimelineFollow(input: TimelineFollowInput) {
536537
if (after.mode === "following") {
537538
// Back at the end, so a later jump away doesn't fold the composer without a new scroll.
538539
setReaderScrolledVisit(null);
540+
refoldFromRef.current = null;
539541
setTimelineAnchor(releaseChatTimelineAnchor);
540542
scroll.showScrollDebouncer.cancel();
541543
setShowScrollToBottom(false);

0 commit comments

Comments
 (0)