autoscroll

This commit is contained in:
rxdn 2024-09-20 23:54:45 +01:00
parent f03108d3b5
commit c4596ab873

View File

@ -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;