diff options
author | Elizabeth Hunt <lizhunt@amazon.com> | 2025-01-16 17:25:09 -0800 |
---|---|---|
committer | Elizabeth Hunt <lizhunt@amazon.com> | 2025-01-16 17:25:09 -0800 |
commit | 0d39d6e98165a35dbbe6ef2cd5d8a42ab2468b2b (patch) | |
tree | a2597448f9b267c7f94487b78f91943a6033b93b | |
parent | b2391b058ba46f807d1ba64f92f4d666adb3abdf (diff) | |
download | phoneof-main.tar.gz phoneof-main.zip |
-rw-r--r-- | static/js/components/chat.js | 1 |
1 files changed, 1 insertions, 0 deletions
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) { |