From 948ce3824653d55b18ff1c618613fb642679bab7 Mon Sep 17 00:00:00 2001
From: Xubin Ren <52506698+Re-bin@users.noreply.github.com>
Date: Sun, 4 Oct 2026 20:21:17 +0800
Subject: [PATCH] fix(webui): keep touch form fields readable without focus
zoom
---
docs/webui.md | 4 ++
webui/src/components/remote/HostSwitcher.tsx | 2 +-
.../src/components/thread/PromptNavigator.tsx | 2 +-
webui/src/components/ui/input.tsx | 2 +-
webui/src/components/ui/textarea.tsx | 2 +-
webui/src/globals.css | 8 ++++
webui/src/tests/touch-input.test.tsx | 47 +++++++++++++++++++
7 files changed, 63 insertions(+), 4 deletions(-)
create mode 100644 webui/src/tests/touch-input.test.tsx
diff --git a/docs/webui.md b/docs/webui.md
index ee7a2672e..704c33665 100644
--- a/docs/webui.md
+++ b/docs/webui.md
@@ -207,6 +207,10 @@ magnified area; normal fitting resumes when
you return to the default zoom. Non-touch desktop and native-host layout remain
unchanged.
+On touch devices, compact text fields use a readable 16px minimum baseline to
+avoid Safari automatically zooming the page on focus. Desktop field density
+and manual page zoom remain unchanged.
+
On touch devices, preview tab controls and
the full-screen image viewer's close button use larger touch areas without
enlarging the icons. Preview tabs remain horizontally scrollable when space is
diff --git a/webui/src/components/remote/HostSwitcher.tsx b/webui/src/components/remote/HostSwitcher.tsx
index ea5baba7d..60887c155 100644
--- a/webui/src/components/remote/HostSwitcher.tsx
+++ b/webui/src/components/remote/HostSwitcher.tsx
@@ -91,7 +91,7 @@ function HostMenuItems({ picker }: { picker: HostPicker }) {