fix: don't bring up the keyboard when menus open or close on mobile (#31657)

This commit is contained in:
G30 2026-09-30 19:09:14 -04:00 • committed by GitHub
parent aee7c47277
commit e797a44806
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 3 deletions

View file

@ -2330,8 +2330,10 @@
onClose={async () => {
await tick();
const chatInput = document.getElementById('chat-input');
chatInput?.focus();
if (!$mobile) {
const chatInput = document.getElementById('chat-input');
chatInput?.focus();
}
}}
>
<button

View file

@ -1,6 +1,7 @@
<script lang="ts">
import { flyAndScale } from '$lib/utils/transitions';
import { tick } from 'svelte';
import { mobile } from '$lib/stores';
/** Whether the dropdown is open */
export let show = false;
@ -275,7 +276,7 @@
if (show) {
closeDropdown();
} else {
openDropdown(true);
openDropdown(!$mobile);
}
}