diff options
Diffstat (limited to 'webAO/client.js')
| -rw-r--r-- | webAO/client.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/webAO/client.js b/webAO/client.js index 9207a1a..ff1774b 100644 --- a/webAO/client.js +++ b/webAO/client.js @@ -1789,7 +1789,8 @@ async changeBackground(position) { const pairSprite = document.getElementById("client_pair_char"); const eviBox = document.getElementById("client_evi"); const shoutSprite = document.getElementById("client_shout"); - const chatBoxInner = document.getElementById("client_inner_chat"); + const chatBoxInner = document.getElementById("client_inner_chat"); + const chatBox = document.getElementById("client_chat"); // TODO: preanims sometimes play when they're not supposed to if (this.textTimer >= this.shoutTimer && this.chatmsg.startpreanim) { @@ -1898,6 +1899,9 @@ async changeBackground(position) { chatBoxInner.innerText = this.textnow; + // scroll to bottom + chatBox.scrollTop = chatBox.scrollHeight; + if (this.textnow === this.chatmsg.content) { this._animating = false; charSprite.src = this.silentSprite; |
