fix: mobile goal UX — bottom-sheet dialog, keyboard-safe target button, capacitor safe-top for overlays

- the goal dialog renders as the shared MobileOverlayPanel bottom sheet
  on mobile instead of a centered dialog
- tapping the target button to ARM keeps the soft keyboard open (the next
  message is the objective; same guard as the attachment/mic buttons),
  while opening the manage sheet lets the keyboard close as usual
- capacitor: bottom-sheet overlays cap their height by the keyboard inset
  AND the top safe area — with the keyboard raised while typing inside a
  sheet, 100dvh does not shrink (native resize is off) and the panel could
  slide under the notch/status bar; applies to every MobileOverlayPanel
This commit is contained in:
Bohdan Triapitsyn
2026-07-12 17:01:40 +03:00
parent 8d956f5f9c
commit 22d5ad3814
3 changed files with 52 additions and 6 deletions
+14
View File
@@ -615,6 +615,20 @@
transition: opacity 0.2s ease-out;
}
/* Bottom-sheet overlays live inside a keyboard-inset surface whose bottom is
lifted by the keyboard height, but their max-height is expressed in 100dvh —
which does NOT shrink in the Capacitor app (native keyboard resize is off).
Without this cap a sheet with the keyboard raised (typing inside it) can
grow past the top safe area and slide under the notch/status bar. Subtract
both the keyboard inset and the top safe area from the available height. */
:root.oc-capacitor-app .pwa-overlay-panel {
max-height: calc(
100dvh
- var(--oc-keyboard-inset, 0px)
- max(0.75rem, env(safe-area-inset-top))
);
}
/* Full-screen scroll views (e.g. the connect/login screen) live outside the app
shell, so shrink them by the keyboard height the same way the shell does. Capping
the height (instead of min-height: 100dvh) is what makes overflow-y-auto actually