Skip to content

Commit

Permalink
feat: delay scrolling to wait for re-render
Browse files Browse the repository at this point in the history
  • Loading branch information
jiegec committed Jun 20, 2024
1 parent 890d635 commit beca2f5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frontend/src/pages/monitor/[hostname].vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ export default {
this.lines = [];
}
this.lines.push(ansi_up.ansi_to_html(event.data) + " <br/> ");
window.scrollTo(0, document.body.scrollHeight);
setTimeout(() => {
window.scrollTo(0, document.body.scrollHeight);
}, 100);
};
},
},
Expand Down

0 comments on commit beca2f5

Please sign in to comment.