Ver Fonte

Update app/components/chat.tsx

fix: chat-body flickers when click-and-hold the scroll bar using mouse
Ma Yuke há 1 ano atrás
pai
commit
dfcae92ae0
1 ficheiros alterados com 1 adições e 0 exclusões
  1. 1 0
      app/components/chat.tsx

+ 1 - 0
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();