hack: prevent error messages from resizing the chat box
authorRaphaël Jakse <raphael.trivabble@jakse.fr>
Sat, 3 Oct 2020 10:33:24 +0000 (12:33 +0200)
committerRaphaël Jakse <raphael.trivabble@jakse.fr>
Sat, 3 Oct 2020 10:33:24 +0000 (12:33 +0200)
public/trivabble.js

index 1441202de8ed8684267b0c7d27b13dc44c2dd36a..c1bdb327f7ab95e4bacdd62c476d12092ccd75ba 100644 (file)
     }
 
     function chatMessage(sender, content) {
+        chatMessages.style.width = chatTextarea.offsetWidth + "px"; // HACK to prevent the chat box from getting too big
         const msgDom = document.createElement("div");
 
         msgDom.className = "msg";