bruh
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Elizabeth Hunt 2025-01-16 17:25:09 -08:00
parent b2391b058b
commit 0d39d6e981

View File

@ -12,6 +12,7 @@ const runChat = async () => {
const scrollTopMax = scrollHeight - clientTop; const scrollTopMax = scrollHeight - clientTop;
const isAtEdge = scrollTop > (0.92 * scrollTopMax) || scrollTop === 0; const isAtEdge = scrollTop > (0.92 * scrollTopMax) || scrollTop === 0;
document.getElementById("messages").innerHTML = html; document.getElementById("messages").innerHTML = html;
await new Promise((res) => setTimeout(res, 200)); // wait for html to emplace.
if (!document.getElementById("chat-container")) return; if (!document.getElementById("chat-container")) return;
const emplacedScrollTopMax = document.getElementById("chat-container").scrollHeight - document.getElementById("chat-container").clientTop; const emplacedScrollTopMax = document.getElementById("chat-container").scrollHeight - document.getElementById("chat-container").clientTop;
if (isAtEdge) { if (isAtEdge) {