autoscroll
This commit is contained in:
parent
f03108d3b5
commit
c4596ab873
@ -141,6 +141,8 @@
|
||||
let sendContent = '';
|
||||
let selectedTag;
|
||||
|
||||
$: messages, setTimeout(scrollToBottom, 100);
|
||||
|
||||
function sendMessage() {
|
||||
dispatch('send', {
|
||||
type: 'message',
|
||||
@ -156,6 +158,12 @@
|
||||
window.scrollTo({top: 0, behavior: 'smooth'});
|
||||
}
|
||||
|
||||
function scrollToBottom() {
|
||||
if (container) {
|
||||
container.scrollTop = container.scrollHeight;
|
||||
}
|
||||
}
|
||||
|
||||
function sendTag() {
|
||||
tagSelectorModal = false;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user