build terminal not scrolling properly with new lines

This commit is contained in:
Olivier Gagnon
2021-09-14 21:09:46 -04:00
parent dc9b5c3341
commit 684a254ac8
4 changed files with 23 additions and 20 deletions
+3
View File
@@ -55,4 +55,7 @@ export function postContent(input: string, config: IPostContentConfig = {}): voi
function scrollTerminalToBottom(): void {
const container: HTMLElement = getElementById("terminal-container");
container.scrollTop = container.scrollHeight;
const td = document.getElementById("terminal-input-td");
if (td === null) throw new Error("terminal-input-td should not be null");
td.scrollIntoView(false);
}