fix: toolbar pushed off-screen on iPad Safari with tabs

On iPad Safari with the tab bar visible, `100vh` extends behind the
browser chrome, pushing the fixed-position toolbar out of view.

- Add `viewport-fit=cover` to viewport meta tag
- Use `100dvh` with `100vh` fallback for body/.app height
- Set `--app-height` CSS variable from `visualViewport.height` via JS
- Offset fixed toolbar on iOS Safari using the layout/visual viewport delta
This commit is contained in:
Skúli Arnlaugsson
2026-03-08 23:54:15 +00:00
parent 507423b776
commit 2e4e646c06
4 changed files with 37 additions and 3 deletions
+8
View File
@@ -1903,6 +1903,14 @@ html.mobile-init .file-browser-panel {
overscroll-behavior: none;
}
/* iPad Safari with tabs: position: fixed uses the layout viewport which extends
behind the browser chrome (tab bar). Calculate the offset between the layout
viewport (innerHeight) and the visual viewport (--app-height) to push the
toolbar into the visible area. --app-height is set by MobileDetection.updateAppHeight(). */
.ios-device.safari-browser .toolbar {
bottom: calc(var(--safe-area-bottom) + (100vh - var(--app-height, 100vh)));
}
.ios-device.safari-browser .terminal-container {
/* Keep momentum scrolling but prevent page bounce */
-webkit-overflow-scrolling: touch;