Commit fbf26be8 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Instantiate box explicitly.

Thanks to Antonin Décimo.
parent 8257a7ff
...@@ -809,8 +809,8 @@ function addToChatbox(peerId, nick, message, me){ ...@@ -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;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment