diff --git a/main.js b/main.js index e9b349a..e6d9264 100644 --- a/main.js +++ b/main.js @@ -114,6 +114,9 @@ function addMessage(idx) { let message = conversation[idx]; let messageHtml = getMessageHtml(message.text, isMessageOurs(message)); getMessageList().innerHTML += messageHtml; + + // scroll as far as we can so that messages aren't hidden + window.scrollTo(0, document.body.scrollHeight); } function getMessageHtml(text, isOurs) {