v3: fix chatbox scroll position on reply, small visual tweaks
All checks were successful
Build and Publish Docker Image / build-and-push (push) Successful in 40s
All checks were successful
Build and Publish Docker Image / build-and-push (push) Successful in 40s
This commit is contained in:
@@ -391,7 +391,10 @@ export function ChatModal({ onClose }: { onClose: () => void }) {
|
||||
const node = listRef.current;
|
||||
if (node && stickToBottomRef.current) node.scrollTop = node.scrollHeight;
|
||||
});
|
||||
}, [messages, typingOthers.length]);
|
||||
// `replyTarget` is a dependency because the reply bar inserts itself
|
||||
// between the list and the composer, shrinking the list: when pinned we
|
||||
// must re-anchor to the bottom so the last message isn't hidden behind it.
|
||||
}, [messages, typingOthers.length, replyTarget]);
|
||||
|
||||
const handleScroll = useCallback(() => {
|
||||
const el = listRef.current;
|
||||
|
||||
Reference in New Issue
Block a user