From 22fe4dca255de76521f31a8123fceeb258b8909e Mon Sep 17 00:00:00 2001 From: pmadry Date: Sun, 28 Jan 2024 09:16:45 +0100 Subject: [PATCH] scroll down logs --- client/static/js/main.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/static/js/main.js b/client/static/js/main.js index 88cadf9..7e0c418 100644 --- a/client/static/js/main.js +++ b/client/static/js/main.js @@ -238,6 +238,8 @@ function addToGameLog(message) { let li = document.createElement("li"); li.innerHTML = message; document.querySelector("#gameLog ul").appendChild(li); + let logParent = document.querySelector("#gameLog"); + logParent.scrollTop = logParent.scrollHeight; } function showLobbyErrorMessage(message) {