From d14fb262ea2eaecca608399920c7d063feb8a699 Mon Sep 17 00:00:00 2001 From: JeffJiang Date: Wed, 28 May 2025 19:11:20 +0800 Subject: [PATCH] fix: message block width (#257) --- .../app/chat/components/message-list-view.tsx | 2 +- .../components/deer-flow/scroll-container.tsx | 24 +++++++++++++++---- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/web/src/app/chat/components/message-list-view.tsx b/web/src/app/chat/components/message-list-view.tsx index 9c455eb..8a44638 100644 --- a/web/src/app/chat/components/message-list-view.tsx +++ b/web/src/app/chat/components/message-list-view.tsx @@ -173,7 +173,7 @@ function MessageListItem({ )} > -
+
({ scrollToBottom() { if (isAtBottom) { scrollToBottom(); } - } + }, })); const tempScrollRef = useRef(null); @@ -51,6 +59,14 @@ export function ScrollContainer({ } }, [autoScrollToBottom, contentRef, scrollRef]); + useLayoutEffect(() => { + if (contentRef.current) { + if (contentRef.current.parentElement) { + contentRef.current.parentElement.style.display = "block"; + } + } + }, [contentRef]); + return (
{scrollShadow && (