From 0d39d6e98165a35dbbe6ef2cd5d8a42ab2468b2b Mon Sep 17 00:00:00 2001 From: Elizabeth Hunt Date: Thu, 16 Jan 2025 17:25:09 -0800 Subject: [PATCH] bruh --- static/js/components/chat.js | 1 + 1 file changed, 1 insertion(+) diff --git a/static/js/components/chat.js b/static/js/components/chat.js index ad876ad..847d64a 100644 --- a/static/js/components/chat.js +++ b/static/js/components/chat.js @@ -12,6 +12,7 @@ const runChat = async () => { const scrollTopMax = scrollHeight - clientTop; const isAtEdge = scrollTop > (0.92 * scrollTopMax) || scrollTop === 0; document.getElementById("messages").innerHTML = html; + await new Promise((res) => setTimeout(res, 200)); // wait for html to emplace. if (!document.getElementById("chat-container")) return; const emplacedScrollTopMax = document.getElementById("chat-container").scrollHeight - document.getElementById("chat-container").clientTop; if (isAtEdge) {