浏览代码

new mobile version fix focus on text

serg1557733 1 年之前
父节点
当前提交
6d0e63d386
共有 2 个文件被更改,包括 13 次插入0 次删除
  1. 7 0
      frontend/src/components/chatPage/ChatPage.jsx
  2. 6 0
      frontend/src/components/chatPage/chatPage.scss

+ 7 - 0
frontend/src/components/chatPage/ChatPage.jsx

@@ -203,6 +203,13 @@ export const ChatPage = () => {
                                 socket.emit('userWriting');
                                 setMessage({message: e.target.value})}
                             } 
+                            onFocus={ e => {
+                                e.target.className = 'focus'
+                            }}
+                            onBlur={e=> {
+                                e.target.className = 'blur'
+
+                            }}
                         
                         /> 
 

+ 6 - 0
frontend/src/components/chatPage/chatPage.scss

@@ -4,6 +4,12 @@
     margin: 0 auto;
 }
 
+.focus {
+    max-width: 80%;
+}
+.blur {
+    width: 100%;
+}
 
 .rootBox {
     display: flex;