fix: Skip auto-focus on mobile to prevent keyboard from opening on prompt bar show
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user