fix: add useActiveElement watcher to blur input fields and update package dependencies

This commit is contained in:
2025-09-04 17:11:16 +02:00
parent 4217eb6c1c
commit 34d2e88e9f
3 changed files with 13 additions and 1 deletions

View File

@@ -45,6 +45,13 @@ defineShortcuts({
t: () => toggleDark({ clientX: window.innerWidth / 2, clientY: window.innerHeight }),
})
const activeElement = useActiveElement()
watch(activeElement, () => {
if (activeElement.value instanceof HTMLElement && ['INPUT', 'TEXTAREA'].includes(activeElement.value.tagName)) {
activeElement.value.blur()
}
})
const modalUi = {
content: 'bg-default-30 dark:bg-default/70 backdrop-blur-xl border border-accented/70 max-w-2xl h-100 flex flex-col shadow-raycast',
}
@@ -107,6 +114,7 @@ function goHome() {
:ui="commandPaletteUi"
:groups="messages"
icon="i-ph-paper-plane-tilt-duotone"
:autofocus="false"
:placeholder="t('palette.cmd.placeholder')"
@update:model-value="onSelect"
@update:open="openMessageModal = $event"