...
|
...
|
@@ -23,12 +23,12 @@ const chatBox = $('#chat-window'); |
|
|
|
|
|
|
|
|
// 聊天调整footer位置
|
|
|
const resizeFooter = () => {
|
|
|
let bottom = $('#chat-footer').height();
|
|
|
// const resizeFooter = () => {
|
|
|
// let bottom = $('#chat-footer').height();
|
|
|
|
|
|
chatBox.css('bottom', `${bottom}px`);
|
|
|
chatBox[0].scrollTop = chatBox[0].scrollHeight;
|
|
|
};
|
|
|
// chatBox.css('bottom', `${bottom}px`);
|
|
|
// chatBox[0].scrollTop = chatBox[0].scrollHeight;
|
|
|
// };
|
|
|
|
|
|
// 配置
|
|
|
const msgTypeMap = {
|
...
|
...
|
@@ -168,7 +168,7 @@ var chat = { |
|
|
})
|
|
|
.on('focus.chat.sendText', '.text-in', function() {
|
|
|
$('.menu').hide();
|
|
|
resizeFooter();
|
|
|
// resizeFooter();
|
|
|
|
|
|
setTimeout(()=>{
|
|
|
$('#chat-footer')[0].scrollIntoView();
|
...
|
...
|
@@ -176,7 +176,9 @@ var chat = { |
|
|
})
|
|
|
.on('keydown.chat.sendText', '.text-in', function(event) {
|
|
|
event.stopPropagation();
|
|
|
document.body.scrollTop = document.body.scrollHeight;
|
|
|
setTimeout(()=>{
|
|
|
$('#chat-footer')[0].scrollIntoView();
|
|
|
}, 0);
|
|
|
|
|
|
if (event.which === 13) {
|
|
|
let val = $.trim(event.target.value);
|
...
|
...
|
@@ -225,7 +227,7 @@ var chat = { |
|
|
self.canEvalute = false;
|
|
|
cmEntity.type = socketConf.recType.EVALUTE_SUCCESS;
|
|
|
socket.send(JSON.stringify(cmEntity));
|
|
|
resizeFooter();
|
|
|
// resizeFooter();
|
|
|
});
|
|
|
|
|
|
window.addEventListener('online', function() {
|
...
|
...
|
|