Fixes for input box growing.

This commit is contained in:
flash 2024-06-27 18:44:12 +00:00
parent 4665b837a0
commit 319b90ea55

View file

@ -51,7 +51,9 @@ Umi.UI.Hooks = (function() {
}
});
msgText.addEventListener('input', function(ev) {
msgText.addEventListener('keyup', function(ev) {
const isScrolledToBottom = Umi.UI.Messages.IsScrolledToBottom();
const elemParent = msgText.parentNode;
let height = 40;
@ -62,6 +64,9 @@ Umi.UI.Hooks = (function() {
elemParent.style.height = height.toString() + 'px';
else
elemParent.style.height = null;
if(isScrolledToBottom)
Umi.UI.Messages.ScrollIfNeeded();
});
msgText.addEventListener('keydown', function(ev) {