From 07c5ca1015457b0d72fa04f8654c5714f2a18a89 Mon Sep 17 00:00:00 2001 From: mappu Date: Sat, 8 Apr 2023 16:04:26 +1200 Subject: [PATCH] webui: autoscroll new messages --- webui.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/webui.go b/webui.go index 90e3339..6c70c70 100644 --- a/webui.go +++ b/webui.go @@ -97,6 +97,8 @@ function main() { } $main.value += decoder.decode(singleReadResult.value); + $main.scrollTop = $main.scrollHeight; + $main.className = 'alert'; setTimeout(() => { $main.className = ''; }, 1);