aboutsummaryrefslogtreecommitdiff
path: root/webAO/client/appendICLog.ts
diff options
context:
space:
mode:
Diffstat (limited to 'webAO/client/appendICLog.ts')
-rw-r--r--webAO/client/appendICLog.ts6
1 files changed, 2 insertions, 4 deletions
diff --git a/webAO/client/appendICLog.ts b/webAO/client/appendICLog.ts
index f8b7852..307009c 100644
--- a/webAO/client/appendICLog.ts
+++ b/webAO/client/appendICLog.ts
@@ -48,10 +48,8 @@ export function appendICLog(
const clientLog = document.getElementById("client_log")!;
clientLog.appendChild(entry);
- /* This is a little buggy - some troubleshooting might be desirable */
- if (clientLog.scrollTop > clientLog.scrollHeight - 800) {
- clientLog.scrollTop = clientLog.scrollHeight;
- }
+ if (clientLog.scrollTop+clientLog.offsetHeight+120>clientLog.scrollHeight)
+ clientLog.scrollTo(0, clientLog.scrollHeight);
setLastICMessageTime(new Date());
} \ No newline at end of file