From dfcae92ae0914004484fc273de3a3ea84f0dd940 Mon Sep 17 00:00:00 2001 From: Ma Yuke Date: Tue, 18 Apr 2023 18:01:09 +0800 Subject: [PATCH] Update app/components/chat.tsx fix: chat-body flickers when click-and-hold the scroll bar using mouse --- app/components/chat.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/app/components/chat.tsx b/app/components/chat.tsx index 3c66627f..5dce8fd6 100644 --- a/app/components/chat.tsx +++ b/app/components/chat.tsx @@ -708,6 +708,7 @@ export function Chat(props: { className={styles["chat-body"]} ref={scrollRef} onScroll={(e) => onChatBodyScroll(e.currentTarget)} + onMouseDown={() => inputRef.current?.blur()} onWheel={(e) => setAutoScroll(hitBottom && e.deltaY > 0)} onTouchStart={() => { inputRef.current?.blur();