diff --git a/src/js/components/Stream.tsx b/src/js/components/Stream.tsx index 44de9b6..ccc8d54 100644 --- a/src/js/components/Stream.tsx +++ b/src/js/components/Stream.tsx @@ -51,8 +51,9 @@ export function Stream({ useEffect(() => { const ul: HTMLElement = document.querySelector("ul.stream")!; - ul.scroll({ top: ul.scrollHeight, behavior: "smooth" }); - }, [stream]); + const top = ul.scrollHeight; + ul.scrollBy({ behavior: "smooth", top }); + }, [stream.length]); return (