diff --git a/client/src/components/game/GamePage.tsx b/client/src/components/game/GamePage.tsx index 9e1970e..d14d30c 100644 --- a/client/src/components/game/GamePage.tsx +++ b/client/src/components/game/GamePage.tsx @@ -105,8 +105,9 @@ export default function GamePage({ initialLobby }: { initialLobby: Game }) { // auto scroll for moves useEffect(() => { const activeMoveEl = document.getElementById("activeNavMove"); - if (!activeMoveEl) return; - activeMoveEl.scrollIntoView({ inline: "nearest", block: "nearest" }); + const moveList = moveListRef.current; + if (!activeMoveEl || !moveList) return; + moveList.scrollTop = activeMoveEl.offsetTop; }); useEffect(() => {