fix enter submits in the time range dropdown

This commit is contained in:
Gregor Vostrak
2025-01-29 13:55:07 +01:00
parent 2dd80ba6cc
commit 68228bccb2
4 changed files with 11 additions and 19 deletions

View File

@@ -20,10 +20,6 @@ const emit = defineEmits<{
const open = ref(false);
const triggerElement = ref<HTMLButtonElement | null>(null);
function closeAndFocusButton() {
triggerElement.value?.focus();
open.value = false;
}
</script>
<template>
@@ -59,7 +55,7 @@ function closeAndFocusButton() {
emit('changed', newStart, newEnd)
"
focus
@close="closeAndFocusButton"
@close="open = false"
:start="start"
:end="end">
</TimeRangeSelector>