Skip to content

Commit

Permalink
fix autoscroll
Browse files Browse the repository at this point in the history
  • Loading branch information
stonedDiscord committed Nov 22, 2023
1 parent dc3c9cc commit fb97c9c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions webAO/client/appendICLog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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+50>clientLog.scrollHeight)
clientLog.scrollTo(0, clientLog.scrollHeight);

setLastICMessageTime(new Date());
}

0 comments on commit fb97c9c

Please sign in to comment.