From e710580c5a21dfd9941636bd47dbb241436a6293 Mon Sep 17 00:00:00 2001 From: sD Date: Thu, 13 Feb 2020 18:03:26 +0100 Subject: we can keep the color as long as we set it before showing the box --- webAO/client.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'webAO') diff --git a/webAO/client.js b/webAO/client.js index 777a560..c21f0e8 100644 --- a/webAO/client.js +++ b/webAO/client.js @@ -1256,7 +1256,6 @@ class Viewport { // Reset CSS animation fg.style.animation = ""; gamewindow.style.animation = ""; - chatBoxInner.className = ""; eviBox.style.opacity = "0"; eviBox.style.height = "0%"; @@ -1568,11 +1567,11 @@ class Viewport { nameBox.style.display = "block"; nameBox.style.fontSize = (nameBox.offsetHeight * 0.7) + "px"; + chatBoxInner.className = this.colors[this.chatmsg.color]; + chatBox.style.display = "block"; chatBox.style.fontSize = (chatBox.offsetHeight * 0.25) + "px"; - chatBoxInner.className = this.colors[this.chatmsg.color]; - this.chatmsg.startspeaking = false; if (this.chatmsg.preanimdelay === 0) { -- cgit