From b3b614c20a6735041d73e3eda94019deb9804722 Mon Sep 17 00:00:00 2001 From: openclaw Date: Sun, 16 Aug 2026 16:45:23 +0800 Subject: [PATCH] fix: disable double tap zoom --- apps/web/src/App.vue | 11 +++++++++-- apps/web/src/styles.css | 1 + tests/e2e/08-兼容性/01-iOS视口.spec.ts | 12 +++++++++++- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/apps/web/src/App.vue b/apps/web/src/App.vue index afe1aa5..9ac58a8 100644 --- a/apps/web/src/App.vue +++ b/apps/web/src/App.vue @@ -6,6 +6,7 @@ import { useAuthStore } from "./stores/auth"; const auth = useAuthStore(); const reconnecting = ref(false); +const preventDoubleTapZoom = (event: MouseEvent) => event.preventDefault(); const retrySession = async () => { if (reconnecting.value || (typeof navigator !== "undefined" && !navigator.onLine)) return; reconnecting.value = true; @@ -17,8 +18,14 @@ const retrySession = async () => { }; const handleOnline = () => void retrySession(); -onMounted(() => window.addEventListener("online", handleOnline)); -onBeforeUnmount(() => window.removeEventListener("online", handleOnline)); +onMounted(() => { + window.addEventListener("online", handleOnline); + window.addEventListener("dblclick", preventDoubleTapZoom, { passive: false }); +}); +onBeforeUnmount(() => { + window.removeEventListener("online", handleOnline); + window.removeEventListener("dblclick", preventDoubleTapZoom); +});