Fixes for input box growing.
This commit is contained in:
parent
4665b837a0
commit
319b90ea55
1 changed files with 6 additions and 1 deletions
|
@ -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;
|
const elemParent = msgText.parentNode;
|
||||||
let height = 40;
|
let height = 40;
|
||||||
|
|
||||||
|
@ -62,6 +64,9 @@ Umi.UI.Hooks = (function() {
|
||||||
elemParent.style.height = height.toString() + 'px';
|
elemParent.style.height = height.toString() + 'px';
|
||||||
else
|
else
|
||||||
elemParent.style.height = null;
|
elemParent.style.height = null;
|
||||||
|
|
||||||
|
if(isScrolledToBottom)
|
||||||
|
Umi.UI.Messages.ScrollIfNeeded();
|
||||||
});
|
});
|
||||||
|
|
||||||
msgText.addEventListener('keydown', function(ev) {
|
msgText.addEventListener('keydown', function(ev) {
|
||||||
|
|
Loading…
Reference in a new issue