summaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
Diffstat (limited to 'static')
-rw-r--r--static/js/components/chat.js1
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) {