From e2fc281210adfac2e3c27f1f08cf2da3576106d6 Mon Sep 17 00:00:00 2001 From: josedario87 Date: Mon, 16 Feb 2026 01:27:52 -0600 Subject: [PATCH] fix: Skip auto-focus on mobile to prevent keyboard from opening on prompt bar show --- frontend/src/components/agent/ChatInput.vue | 4 +++- frontend/src/components/agent/PromptBar.vue | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/agent/ChatInput.vue b/frontend/src/components/agent/ChatInput.vue index 32dc272..0dff8f5 100644 --- a/frontend/src/components/agent/ChatInput.vue +++ b/frontend/src/components/agent/ChatInput.vue @@ -34,8 +34,10 @@ function focus() { inputEl.value?.focus() } +const isMobile = () => window.innerWidth < 480 + watch(() => props.autofocus, async (v) => { - if (v) { + if (v && !isMobile()) { await nextTick() focus() } diff --git a/frontend/src/components/agent/PromptBar.vue b/frontend/src/components/agent/PromptBar.vue index 1b0fc14..44d771f 100644 --- a/frontend/src/components/agent/PromptBar.vue +++ b/frontend/src/components/agent/PromptBar.vue @@ -651,7 +651,7 @@ watch(() => props.visible, async (v) => { await nextTick() if (props.startRecording) { handleMic() - } else { + } else if (window.innerWidth >= 480) { chatInputEl.value?.focus() } } else {