Update check_valid_message and fix bugs copy latex
This commit is contained in:
parent
bb5b563431
commit
dbea1d0968
2 changed files with 23 additions and 21 deletions
|
@ -36,8 +36,7 @@
|
|||
$('#chat-log').prepend(data);
|
||||
}
|
||||
|
||||
register_time($('.time-with-rel'));
|
||||
merge_authors();
|
||||
postProcessMessages();
|
||||
|
||||
if (!refresh_html) {
|
||||
$chat_box.scrollTop(scrollTopOfBottom($chat_box) - lastMsgPos);
|
||||
|
@ -51,6 +50,13 @@
|
|||
})
|
||||
}
|
||||
|
||||
function postProcessMessages() {
|
||||
register_time($('.time-with-rel'));
|
||||
MathJax.typeset();
|
||||
populateCopyButton();
|
||||
merge_authors();
|
||||
}
|
||||
|
||||
function scrollTopOfBottom(container) {
|
||||
return container[0].scrollHeight - container.innerHeight()
|
||||
}
|
||||
|
@ -111,10 +117,7 @@
|
|||
|
||||
$('#chat-log').append($data);
|
||||
$('#chat-box').scrollTop($('#chat-box')[0].scrollHeight);
|
||||
register_time($('.time-with-rel'));
|
||||
MathJax.typeset();
|
||||
populateCopyButton();
|
||||
merge_authors();
|
||||
postProcessMessages();
|
||||
}
|
||||
|
||||
function add_new_message(message, room, is_self_author) {
|
||||
|
@ -167,11 +170,8 @@
|
|||
else {
|
||||
add_new_message(message, room, true);
|
||||
}
|
||||
MathJax.typeset();
|
||||
populateCopyButton();
|
||||
register_time($('.time-with-rel'));
|
||||
remove_unread_current_user();
|
||||
merge_authors();
|
||||
postProcessMessages();
|
||||
},
|
||||
error: function (data) {
|
||||
console.log('Fail to check message');
|
||||
|
@ -310,8 +310,9 @@
|
|||
load_next_page(null, true);
|
||||
update_last_seen();
|
||||
refresh_status(true);
|
||||
$('#chat-input').focus();
|
||||
|
||||
show_right_panel();
|
||||
$('#chat-input').focus();
|
||||
$('#chat-input').val('').trigger('input');
|
||||
}
|
||||
window.lock_click_space = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue