From 1afca0b28acb0f4e9ea60809355be8897c779e11 Mon Sep 17 00:00:00 2001 From: Yifei Zhang Date: Sun, 2 Apr 2023 18:41:25 +0000 Subject: [PATCH] fix: mobile scroll problem --- app/components/chat.tsx | 1 + app/components/home.module.scss | 1 + app/styles/globals.scss | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/components/chat.tsx b/app/components/chat.tsx index b35cd3eb..b152e8ae 100644 --- a/app/components/chat.tsx +++ b/app/components/chat.tsx @@ -548,6 +548,7 @@ export function Chat(props: {
inputRef.current?.blur()} + onTouchStart={() => inputRef.current?.blur()} > {!isUser && !(message.preview || message.content.length === 0) && ( diff --git a/app/components/home.module.scss b/app/components/home.module.scss index 95964ae1..64ac2363 100644 --- a/app/components/home.module.scss +++ b/app/components/home.module.scss @@ -333,6 +333,7 @@ .chat-input-panel { width: 100%; padding: 20px; + padding-top: 5px; box-sizing: border-box; flex-direction: column; } diff --git a/app/styles/globals.scss b/app/styles/globals.scss index e179dcf3..81811819 100644 --- a/app/styles/globals.scss +++ b/app/styles/globals.scss @@ -188,7 +188,7 @@ input[type="text"] { appearance: none; border-radius: 10px; border: var(--border-in-light); - height: 36px; + min-height: 36px; box-sizing: border-box; background: var(--white); color: var(--black);