fix: prevent app offset on mobile refresh - simplify keyboard handling

- Revert interactive-widget viewport meta (caused iOS layout shifts)
- Delay initial viewport height capture to let viewport stabilize
- Update initialViewportHeight on window resize (address bar changes)
- Remove visualViewport scroll handler (not needed, caused issues)
- Scope keyboard CSS to .modal.active only
- Use vh instead of dvh for more stable layout

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
arkon
2026-01-31 08:02:27 +01:00
co-authored by Claude Opus 4.5
parent 1288338e58
commit 61c7a57426
5 changed files with 23 additions and 31 deletions
+5 -6
View File
@@ -7886,7 +7886,7 @@ kbd {
scroll-margin-top: 80px;
}
.keyboard-visible .modal-body {
.keyboard-visible .modal.active .modal-body {
max-height: calc(60vh - var(--keyboard-height) / 2);
overflow-y: auto;
}
@@ -8417,15 +8417,15 @@ kbd {
}
/* Modal adjustments when keyboard is visible */
.keyboard-visible .modal-content {
.keyboard-visible .modal.active .modal-content {
/* Don't take full height - resize with keyboard */
height: auto;
max-height: calc(100dvh - var(--keyboard-height));
max-height: calc(100vh - var(--keyboard-height));
}
.keyboard-visible .modal-body {
.keyboard-visible .modal.active .modal-body {
/* Limit modal body height when keyboard up - make room for header/footer */
max-height: calc(50dvh - var(--keyboard-height) / 3);
max-height: calc(50vh - var(--keyboard-height) / 3);
overflow-y: auto;
-webkit-overflow-scrolling: touch;
}
@@ -8436,7 +8436,6 @@ kbd {
============================================================================ */
:root {
--keyboard-height: 0px;
--viewport-offset-top: 0px;
}
.keyboard-visible .toolbar {