Skip to content

Commit f904f05

Browse files
committed
fix(chat): resume pending send scroll after find closes
1 parent 16d35b2 commit f904f05

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎apps/sim/app/workspace/[workspaceId]/home/components/mothership-chat/mothership-chat.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -807,9 +807,9 @@ export function MothershipChat({
807807
const scrolledForUserMsgRef = useRef<string | undefined>(undefined)
808808
useLayoutEffect(() => {
809809
if (!lastUserMessageId || scrolledForUserMsgRef.current === lastUserMessageId) return
810-
if (isSending && initialScrollBlocked) return
810+
if (find.isOpen || (isSending && initialScrollBlocked)) return
811811
scrolledForUserMsgRef.current = lastUserMessageId
812-
if (!isSending || find.isOpen) return
812+
if (!isSending) return
813813
virtualizer.scrollToIndex(lastIndex, { align: 'end' })
814814
}, [lastUserMessageId, lastIndex, isSending, initialScrollBlocked, virtualizer, find.isOpen])
815815

0 commit comments

Comments
 (0)