scrollBy offsetHeight + scrollTop

This commit is contained in:
0x1eef 2023-12-04 00:14:35 -03:00
parent a773da0a06
commit f2db229dd0

View file

@ -51,7 +51,7 @@ export function Stream({
useEffect(() => {
const ul: HTMLElement = document.querySelector("ul.stream")!;
const top = ul.scrollHeight;
const top = ul.offsetHeight + ul.scrollTop;
ul.scrollBy({ behavior: "smooth", top });
}, [stream.length]);