Better scrolling (I hope)

This commit is contained in:
SillyLossy
2023-02-27 21:19:04 +02:00
parent 1b8b8f0f37
commit a1c797fb13

View File

@ -1799,7 +1799,7 @@
// update indicator and scroll down // update indicator and scroll down
typingIndicator.find('.typing_indicator_name').text(characters[chId].name); typingIndicator.find('.typing_indicator_name').text(characters[chId].name);
$('#chat').append(typingIndicator); $('#chat').append(typingIndicator);
typingIndicator.fadeTo(250, 1, function() { typingIndicator.show(250, function() {
typingIndicator.get(0).scrollIntoView({behavior: 'smooth'}); typingIndicator.get(0).scrollIntoView({behavior: 'smooth'});
}); });
@ -1814,7 +1814,7 @@
} }
// hide and reapply the indicator to the bottom of the list // hide and reapply the indicator to the bottom of the list
typingIndicator.fadeTo(250, 0); typingIndicator.hide(250);
$('#chat').append(typingIndicator); $('#chat').append(typingIndicator);
} }