fix: resolve modal header scroll-behind issue on iOS PWA (closes #50)

position: sticky on .modal-panel__header failed on iOS WebKit when the
scroll container had padding-top applied (drag-handle spacing). Restructured
modal layout: .modal-panel is now a flex-column with overflow:hidden and
.modal-panel__body handles scrolling (overflow-y:auto, flex:1). The header
is a non-scrolled flex sibling, so it stays visible without sticky. Updated
swipe-to-close to read .modal-panel__body scroll position.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Ulas Kalayci
2026-04-19 07:19:42 +02:00
parent 6fee35d1d9
commit 3c2a2fe6e9
4 changed files with 18 additions and 6 deletions
+8 -4
View File
@@ -648,7 +648,9 @@
background-color: var(--color-surface);
width: 100%;
max-height: 90dvh;
overflow-y: auto;
overflow: hidden;
display: flex;
flex-direction: column;
border-radius: var(--radius-lg) var(--radius-lg) 0 0;
border: 1px solid var(--color-border-subtle);
box-shadow: var(--shadow-lg);
@@ -673,10 +675,8 @@
justify-content: space-between;
padding: var(--space-4);
border-bottom: 1px solid var(--color-border-subtle);
position: sticky;
top: 0;
background-color: var(--color-surface);
z-index: 1;
flex-shrink: 0;
}
.modal-panel__title {
@@ -706,6 +706,10 @@
display: flex;
flex-direction: column;
gap: var(--space-4);
flex: 1;
min-height: 0;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
}
/* Modal-Content-Grids (z. B. 2 Spalten in Formularen) */