Skip to content

Commit 5ff3e00

Browse files
fix(Modal): use percentage sizing to prevent scrollbar flash (#744)
Co-authored-by: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com>
1 parent 76485fd commit 5ff3e00

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/modal/modal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ const Modal = ({
122122
<Transition.Root show={open} as={Fragment}>
123123
<Dialog
124124
onClose={onClose}
125-
className="relative z-1050 w-screen h-screen"
125+
className="relative z-1050 w-full h-full "
126126
onKeyDown={onKeyDown}
127127
initialFocus={initialFocus}
128128
>
@@ -131,7 +131,7 @@ const Modal = ({
131131

132132
{/* Full-screen container of the panel */}
133133
<div
134-
className={`fixed inset-0 flex items-start justify-center p-[10px] md:pt-[30px] md:pb-[30px] overflow-scroll`}
134+
className={`fixed inset-0 flex items-start justify-center p-[10px] md:pt-[30px] md:pb-[30px] overflow-auto`}
135135
>
136136
<Transition.Child
137137
as={Fragment}

0 commit comments

Comments
 (0)