From 56ba8a65e06937b7ba1a072cb959e0d3626c32d7 Mon Sep 17 00:00:00 2001 From: Yifei Zhang Date: Mon, 3 Apr 2023 03:35:24 +0000 Subject: [PATCH] fix: improve scroll --- app/components/chat.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/components/chat.tsx b/app/components/chat.tsx index f13ba6e7..8b687c7e 100644 --- a/app/components/chat.tsx +++ b/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 (