[web] qns/quiz: disable scroll restoration for quiz scroll mode (#1675)

This commit is contained in:
Nitesh Seram 2025-09-08 12:00:33 +05:30 committed by GitHub
parent 59c6015036
commit 8a00c2d714
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 10 additions and 0 deletions

View File

@ -128,6 +128,16 @@ export default function QuestionQuizScrollableList({
}, 250);
};
useEffect(() => {
// Disable scroll restoration to prevent conflicts with our scrollToIndex
window.history.scrollRestoration = 'manual';
return () => {
// Restore original scroll restoration setting
window.history.scrollRestoration = 'auto';
};
}, []);
useQuestionsAutoMarkAsComplete(currentQuestion);
return (