From a674bc1ba5cf03785238640f8509c5112b2c90e8 Mon Sep 17 00:00:00 2001
From: "630892807@qq.com" <630892807@qq.com>
Date: Sun, 14 Mar 2021 23:19:47 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=BD=AF=E9=94=AE=E7=9B=98?=
=?UTF-8?q?=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
static/html/chat_page.html | 2 +-
static/js/chat-page.js | 10 +++++++---
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/static/html/chat_page.html b/static/html/chat_page.html
index ef2b80d..01cc970 100644
--- a/static/html/chat_page.html
+++ b/static/html/chat_page.html
@@ -55,7 +55,7 @@
-
+
![]()
diff --git a/static/js/chat-page.js b/static/js/chat-page.js
index 4171766..370ac1a 100644
--- a/static/js/chat-page.js
+++ b/static/js/chat-page.js
@@ -17,6 +17,7 @@ new Vue({
timer:null,
sendDisabled:false,
flyLang:GOFLY_LANG[LANG],
+ textareaFocused:false,
},
methods: {
//初始化websocket
@@ -260,18 +261,21 @@ new Vue({
textareaFocus:function(){
if(/Android|webOS|iPhone|iPad|BlackBerry/i.test(navigator.userAgent)) {
$('body').scrollTop($("body")[0].scrollHeight);
- $(".chatContext").css("margin-bottom","1px");
+ $(".chatContext").css("margin-bottom","0");
$(".chatBoxSend").css("position","static");
+ this.textareaFocused=true;
}
},
textareaBlur:function(){
- if(/Android|webOS|iPhone|iPad|BlackBerry/i.test(navigator.userAgent)) {
+ if(this.textareaFocused&&/Android|webOS|iPhone|iPad|BlackBerry/i.test(navigator.userAgent)) {
var chatBoxSendObj=$(".chatBoxSend");
var chatContextObj=$(".chatContext");
- if(chatBoxSendObj.css("position")!="fixed"){
+ if(this.textareaFocused&&chatBoxSendObj.css("position")!="fixed"){
chatContextObj.css("margin-bottom","105px");
chatBoxSendObj.css("position","fixed");
+ this.textareaFocused=false;
}
+
}
},
//获取日期