학습 내용 선택 화면 추가
This commit is contained in:
@@ -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