Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: Improve scrolling behavior for Conversation Opener (#8437)

Nam Vu624331472a17
diff --git a/web/app/components/base/chat/chat/index.tsx b/web/app/components/base/chat/chat/index.tsx
index 65e49eff67d..68194193c49 100644
--- a/web/app/components/base/chat/chat/index.tsx
+++ b/web/app/components/base/chat/chat/index.tsx
@@ -109,9 +109,9 @@ const Chat: FC<ChatProps> = ({
const userScrolledRef = useRef(false)
const handleScrollToBottom = useCallback(() => {
- if (chatContainerRef.current && !userScrolledRef.current)
+ if (chatList.length > 1 && chatContainerRef.current && !userScrolledRef.current)
chatContainerRef.current.scrollTop = chatContainerRef.current.scrollHeight
- }, [])
+ }, [chatList.length])
const handleWindowResize = useCallback(() => {
if (chatContainerRef.current)