fix: Skip auto-focus on mobile to prevent keyboard from opening on prompt bar show

This commit is contained in:
2026-02-16 01:27:52 -06:00
parent cf2755a731
commit e2fc281210
2 changed files with 4 additions and 2 deletions

View File

@@ -34,8 +34,10 @@ function focus() {
inputEl.value?.focus() inputEl.value?.focus()
} }
const isMobile = () => window.innerWidth < 480
watch(() => props.autofocus, async (v) => { watch(() => props.autofocus, async (v) => {
if (v) { if (v && !isMobile()) {
await nextTick() await nextTick()
focus() focus()
} }

View File

@@ -651,7 +651,7 @@ watch(() => props.visible, async (v) => {
await nextTick() await nextTick()
if (props.startRecording) { if (props.startRecording) {
handleMic() handleMic()
} else { } else if (window.innerWidth >= 480) {
chatInputEl.value?.focus() chatInputEl.value?.focus()
} }
} else { } else {