학습 내용 선택 화면 추가
This commit is contained in:
1 parent
4d6fb49cba
commit
335898b721
8 files changed
+495
-82
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user