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;
|
||||
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) {
|
||||
|
|
Loading…
Reference in a new issue