Update app/components/chat.tsx

fix: chat-body flickers when click-and-hold the scroll bar using mouse
This commit is contained in:
Ma Yuke 2023-04-18 18:01:09 +08:00
parent 8da581695f
commit dfcae92ae0

View File

@ -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();