浏览代码

Merge pull request #2557 from Yidadaa/bugfix-0804

feat: disable auto focus on mobile screen
Yifei Zhang 1 年之前
父节点
当前提交
ff6f0e9546
共有 1 个文件被更改,包括 1 次插入4 次删除
  1. 1 4
      app/components/chat.tsx

+ 1 - 4
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({