1
0
mirror of https://github.com/amir20/dozzle.git synced 2026-01-04 03:54:58 +01:00

Fixes scroll

This commit is contained in:
Amir Raminfar
2018-11-13 16:45:12 -08:00
parent 972cbb8b2e
commit dc42180339

View File

@@ -39,8 +39,11 @@ export default {
ws.onerror = e => console.error("Connection error: " + e.data);
ws.onmessage = e => {
const message = parseMessage(e.data);
this.messages.push(message);
this.$nextTick(() => this.messages.push(message));
this.$nextTick(() =>
document.querySelector("li.event:last-child").scrollIntoView()
);
};
},
beforeDestroy() {