From 9e5100c71cac210811d1676585cd02ed8b8cc7f9 Mon Sep 17 00:00:00 2001 From: Maurice Date: Tue, 21 Apr 2026 21:36:43 +0200 Subject: [PATCH] fix: keep modal save button visible on mobile (#803, #804) Two fixes in Modal.tsx: - Replace 100vh with 100dvh so iOS Safari PWA respects the actual visible viewport. Explicitly subtract --bottom-nav-h on mobile so the modal never extends behind the tab bar. - overflow-hidden on the container so the footer's bottom corners inherit rounded-2xl. - flex-shrink-0 on header and footer + min-h-0 on the body so the body shrinks and scrolls while the footer stays put. One fix in PlaceFormModal.tsx: - Save/cancel were rendered inside the scrollable body. Moved them into the Modal's footer slot. --- .../src/components/Planner/PlaceFormModal.tsx | 36 ++++++++++--------- client/src/components/shared/Modal.tsx | 17 ++++----- 2 files changed, 28 insertions(+), 25 deletions(-) diff --git a/client/src/components/Planner/PlaceFormModal.tsx b/client/src/components/Planner/PlaceFormModal.tsx index 1b1588c9..725ad8f0 100644 --- a/client/src/components/Planner/PlaceFormModal.tsx +++ b/client/src/components/Planner/PlaceFormModal.tsx @@ -360,6 +360,25 @@ export default function PlaceFormModal({ onClose={onClose} title={place ? t('places.editPlace') : t('places.addPlace')} size="lg" + footer={ +
+ + +
+ } >
{/* Place Search */} @@ -613,23 +632,6 @@ export default function PlaceFormModal({ )} - {/* Actions */} -
- - -
) diff --git a/client/src/components/shared/Modal.tsx b/client/src/components/shared/Modal.tsx index 54b27ead..246de62d 100644 --- a/client/src/components/shared/Modal.tsx +++ b/client/src/components/shared/Modal.tsx @@ -61,14 +61,15 @@ export default function Modal({
e.stopPropagation()} > - {/* Header */} -
+ {/* Header — stays put even while the body scrolls */} +

{title}

{!hideCloseButton && (