Explorar o código

fix: improve scroll

Yifei Zhang %!s(int64=2) %!d(string=hai) anos
pai
achega
56ba8a65e0
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      app/components/chat.tsx

+ 2 - 2
app/components/chat.tsx

@@ -461,9 +461,9 @@ export function Chat(props: {
 
   // Auto focus
   useEffect(() => {
-    if (props.sideBarShowing) return;
+    if (props.sideBarShowing && isMobileScreen()) return;
     inputRef.current?.focus();
-  }, [props.sideBarShowing]);
+  }, []);
 
   return (
     <div className={styles.chat} key={session.id}>