1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-11-10 02:35:58 +01:00

Instantiate box explicitly.

Thanks to Antonin Décimo.
This commit is contained in:
Juliusz Chroboczek 2020-05-11 02:58:48 +02:00
parent 8257a7ff19
commit fbf26be8c6

View file

@ -809,8 +809,8 @@ function addToChatbox(peerId, nick, message, me){
delete(lastMessage.peerId); delete(lastMessage.peerId);
} }
document.getElementById('box').appendChild(container); let box = document.getElementById('box');
box.appendChild(container);
if(box.scrollHeight > box.clientHeight) { if(box.scrollHeight > box.clientHeight) {
box.scrollTop = box.scrollHeight - box.clientHeight; box.scrollTop = box.scrollHeight - box.clientHeight;
} }