From 1db3e7f368573b03072a681001df2123e04175e6 Mon Sep 17 00:00:00 2001 From: Daniel Date: Wed, 1 Apr 2026 05:05:33 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20scroll:=20window.scrollTo(0)=20on=20Next/?= =?UTF-8?q?Prev=20=E2=80=94=20scrolls=20to=20top=20of=20page,=20not=20just?= =?UTF-8?q?=20element?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/pages/QuizPage.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/pages/QuizPage.jsx b/frontend/src/pages/QuizPage.jsx index fd74fa9..3298c02 100644 --- a/frontend/src/pages/QuizPage.jsx +++ b/frontend/src/pages/QuizPage.jsx @@ -232,7 +232,8 @@ useEffect(() => { const safeNavigate = (targetIdx) => { setCurrentIdx(targetIdx) setTimeout(() => { - document.querySelector('.question-card')?.scrollIntoView({ behavior: 'smooth', block: 'start' }) + // Scroll to top of page so user sees the full question from the start + window.scrollTo({ top: 0, behavior: 'smooth' }) }, 50) }