From 3e63f6ba345a2598e0d1e3ccf4feec9c4679ff18 Mon Sep 17 00:00:00 2001 From: Yidadaa Date: Fri, 4 Aug 2023 02:43:55 +0800 Subject: [PATCH] feat: disable auto focus on mobile screen --- app/components/chat.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/components/chat.tsx b/app/components/chat.tsx index 1ed87848..c7a8e9ba 100644 --- a/app/components/chat.tsx +++ b/app/components/chat.tsx @@ -965,10 +965,7 @@ function _Chat() { const clientConfig = useMemo(() => getClientConfig(), []); - const location = useLocation(); - const isChat = location.pathname === Path.Chat; - - const autoFocus = !isMobileScreen || isChat; // only focus in chat page + const autoFocus = !isMobileScreen; // wont auto focus on mobile screen const showMaxIcon = !isMobileScreen && !clientConfig?.isApp; useCommand({