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 {