This commit is contained in:
Timothy Jaeryang Baek committed 2026-05-09 16:37:19 +09:00
1 parent 413dcae8a2
commit 7d3efb8513
2 files changed
+33 -1

No files matched your search

+10 -1
View File
@@ -140,7 +140,16 @@
const scrollToBottom = () => {
const element = document.getElementById('messages-container');
element.scrollTop = element.scrollHeight;
if (element) {
element.scrollTop = element.scrollHeight;
// Follow-up scroll to account for content-visibility: auto re-layouts
requestAnimationFrame(() => {
if (element) {
element.scrollTop = element.scrollHeight;
}
});
}
};
export const scrollToTop = async () => {