diff --git a/l4d2web/l4d2web/static/js/tabs.js b/l4d2web/l4d2web/static/js/tabs.js index 619b5b8..00df844 100644 --- a/l4d2web/l4d2web/static/js/tabs.js +++ b/l4d2web/l4d2web/static/js/tabs.js @@ -16,6 +16,14 @@ p.hidden = p.dataset.tab !== name; }); strip.dataset.activeTab = name; + + // Pin any scroll-locked regions (log streams, console transcripts) in + // the newly-visible pane to the bottom. While the pane was hidden, + // their scrollHeight was 0 so previous appends couldn't anchor. + const activePane = strip.querySelector('[role="tabpanel"]:not([hidden])'); + if (activePane && window.scrollAutoscrollTargets) { + window.scrollAutoscrollTargets(activePane); + } } function activeTabName(strip) { diff --git a/l4d2web/l4d2web/templates/server_detail.html b/l4d2web/l4d2web/templates/server_detail.html index f0fa421..a8e95c9 100644 --- a/l4d2web/l4d2web/templates/server_detail.html +++ b/l4d2web/l4d2web/templates/server_detail.html @@ -58,7 +58,7 @@
No job has run for this server yet.