fix(webui): keep touch app chrome inside the visual viewport

This commit is contained in:
Xubin Ren committed 2026-10-04 10:40:09 +08:00
1 parent 69a368fdf8
commit 4e77584eb7
7 files changed
+157

No files matched your search

@@ -219,6 +219,9 @@ function canScrollInDirection(
}
function readSoftKeyboardInsetBottom(container: HTMLElement | null): number {
// The touch App shell already fits the visual viewport, including portaled
// composers. Keep the existing local inset only for unfitted/native layouts.
if (container?.closest("#root.visual-viewport")) return 0;
const viewport = window.visualViewport;
if (!viewport) return 0;
const active = document.activeElement;