Переглянути джерело

fix: mobile scroll problem

Yifei Zhang 2 роки тому
батько
коміт
1afca0b28a
3 змінених файлів з 3 додано та 1 видалено
  1. 1 0
      app/components/chat.tsx
  2. 1 0
      app/components/home.module.scss
  3. 1 1
      app/styles/globals.scss

+ 1 - 0
app/components/chat.tsx

@@ -548,6 +548,7 @@ export function Chat(props: {
                 <div
                 <div
                   className={styles["chat-message-item"]}
                   className={styles["chat-message-item"]}
                   onMouseOver={() => inputRef.current?.blur()}
                   onMouseOver={() => inputRef.current?.blur()}
+                  onTouchStart={() => inputRef.current?.blur()}
                 >
                 >
                   {!isUser &&
                   {!isUser &&
                     !(message.preview || message.content.length === 0) && (
                     !(message.preview || message.content.length === 0) && (

+ 1 - 0
app/components/home.module.scss

@@ -333,6 +333,7 @@
 .chat-input-panel {
 .chat-input-panel {
   width: 100%;
   width: 100%;
   padding: 20px;
   padding: 20px;
+  padding-top: 5px;
   box-sizing: border-box;
   box-sizing: border-box;
   flex-direction: column;
   flex-direction: column;
 }
 }

+ 1 - 1
app/styles/globals.scss

@@ -188,7 +188,7 @@ input[type="text"] {
   appearance: none;
   appearance: none;
   border-radius: 10px;
   border-radius: 10px;
   border: var(--border-in-light);
   border: var(--border-in-light);
-  height: 36px;
+  min-height: 36px;
   box-sizing: border-box;
   box-sizing: border-box;
   background: var(--white);
   background: var(--white);
   color: var(--black);
   color: var(--black);