mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-22 02:28:42 +00:00
feat(user_msg): auto scroll to bottom after enter or send msg
This commit is contained in:
parent
99e9a839af
commit
d6ac737a11
@ -150,7 +150,7 @@ if (isset($_POST['user_msg'])) {
|
||||
<button id="goBack" class="btn-close position-absolute" aria-label="关闭对话"></button>
|
||||
<div id="conversation-name" class="text-center"></div>
|
||||
</div>
|
||||
<div class="card-body overflow-auto">
|
||||
<div class="card-body overflow-auto" id="history-list-container">
|
||||
<div id="history-list" style="min-height: 200px;"></div>
|
||||
</div>
|
||||
<div class="card-footer bg-transparent">
|
||||
@ -376,6 +376,7 @@ if (isset($_POST['user_msg'])) {
|
||||
}, REFRESH_INTERVAL);
|
||||
$('#history').show();
|
||||
$('#conversations').addClass('d-none d-md-block')
|
||||
$("#history-list-container").scrollTop($("#history-list").height());
|
||||
$('#input-message').unbind('keydown').keydown(function(e) {
|
||||
if (e.keyCode == 13 && e.ctrlKey) {
|
||||
$('#message-submit').click();
|
||||
@ -386,6 +387,7 @@ if (isset($_POST['user_msg'])) {
|
||||
page = 1;
|
||||
changeAble = refreshHistory(conversationName, page);
|
||||
refreshConversations();
|
||||
$("#history-list-container").scrollTop($("#history-list").height());
|
||||
return false;
|
||||
});
|
||||
$('#goBack').unbind("click").click(function() {
|
||||
|
Loading…
Reference in New Issue
Block a user