scroll logs to bottom

This commit is contained in:
Muhammad Labeeb 2025-02-27 17:32:51 +05:00 committed by Régis Behmo
parent 7bbd4d10c5
commit 72596930c6
2 changed files with 10 additions and 1 deletions

View File

@ -26,3 +26,12 @@ close.forEach((button) => {
modal_container.classList.remove("show");
});
});
const logsContainer = document.getElementById('tutor-logs');
const observer = new MutationObserver(() => {
logsContainer.scrollTop = logsContainer.scrollHeight;
});
observer.observe(logsContainer, { childList: true, subtree: true });

View File

@ -505,7 +505,7 @@ main {
white-space: pre-wrap;
word-wrap: break-word;
overflow-y: auto;
height: 100%;
height: 40em;
}
}
}