fix: 내 레벨·레벨업·오늘 타로 창이 길면 창 안에서 스크롤되게, 창 끝에서 뒤 페이지로 스크롤이 넘어가지 않게

This commit is contained in:
minaChoi committed 2026-10-28 17:22:32 +09:00
1 parent c61d488794
commit 8ca1d12822
3 files changed
+6 -3

No files matched your search

+3
View File
@@ -156,11 +156,14 @@ function SheetHost({ state, onClose }: { state: SheetState; onClose: () => void
const root = document.documentElement
const before = root.style.overflow
root.style.overflow = 'hidden'
// 창 안에서 끝까지 밀어도 뒤 페이지로 넘어가지 않게
root.style.overscrollBehavior = 'none'
// 뒤 화면 움직임 멈추기는 페이지 전체 스타일을 다시 계산하게 해서, 창이 다 올라온 뒤에 한다
const pause = setTimeout(() => root.classList.add('b-sheet-open'), SHEET_OPEN_MS)
return () => {
clearTimeout(pause)
root.style.overflow = before
root.style.overscrollBehavior = ''
root.classList.remove('b-sheet-open')
}
}, [isOpen])