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