학습 내용 선택 화면 추가

This commit is contained in:
2026-05-29 22:48:23 +09:00
parent 4d6fb49cba
commit 335898b721
8 changed files with 495 additions and 82 deletions
+2 -2
View File
@@ -121,7 +121,7 @@ export default function PlayClient({ problemCount }: PlayClientProps) {
const rect = katexElement.getBoundingClientRect();
const scrollElement =
document.scrollingElement ?? document.documentElement;
const elementDocumentTop = window.pageYOffset + rect.top;
const elementDocumentTop = window.scrollY + rect.top;
const maxScrollTop = Math.max(
0,
scrollElement.scrollHeight - window.innerHeight,
@@ -131,7 +131,7 @@ export default function PlayClient({ problemCount }: PlayClientProps) {
Math.max(0, elementDocumentTop),
);
if (Math.abs(window.pageYOffset - scrollTop) < 4) return;
if (Math.abs(window.scrollY - scrollTop) < 4) return;
scrollElement.scrollTop = scrollTop;
document.body.scrollTop = scrollTop;