diff --git a/static/index.js b/static/index.js index b92becb..9b85917 100644 --- a/static/index.js +++ b/static/index.js @@ -37,9 +37,9 @@ async function addMsg(msg) { item.insertBefore(img,item.childNodes[0]) } wrap.appendChild(item); - window.scrollTo(0, document.body.scrollHeight); } messages.appendChild(wrap); + window.scrollTo(0, document.body.scrollHeight); } async function main(e) {