Skip to content

Commit

Permalink
Fixed bottom part of modals getting cut off on mobile
Browse files Browse the repository at this point in the history
ref https://linear.app/ghost/issue/DES-1069/cannot-save-changes-made-to-staff-user-profile-from-mobile-device, https://linear.app/ghost/issue/DES-1070/on-mobile-cannot-click-send-invitation-now-when-adding-staff-members

- We were using viewport units to set the height of the modal, but the issue with that value is that it doesn't take into account browser toolbars on phones. Switching to dynamic viewport units fixes this issue.
  • Loading branch information
djordjevlais committed Jan 8, 2025
1 parent 620b42f commit d9abbb5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/admin-x-design-system/src/global/modal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ const Modal: React.FC<ModalProps> = ({
);

let backdropClasses = clsx(
'fixed inset-0 z-[1000] h-[100vh] w-[100vw]',
'fixed inset-0 z-[1000] h-[100dvh] w-[100dvw]',
allowBackgroundInteraction && 'pointer-events-none'
);

Expand Down

0 comments on commit d9abbb5

Please sign in to comment.