Bladeren bron

Update app/components/chat.tsx

fix: chat-body flickers when click-and-hold the scroll bar using mouse
Ma Yuke 1 jaar geleden
bovenliggende
commit
dfcae92ae0
1 gewijzigde bestanden met toevoegingen van 1 en 0 verwijderingen
  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();