Skip to content

Commit d6fe8db

Browse files
committed
refactor: 🐛 Make alt text editor close when saving
1 parent 3532d5f commit d6fe8db

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

components/composer/uploader/alt-text-editor.vue

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<Popover.Root :positioning="{
33
strategy: 'fixed',
4-
}" @update:open="o => !o && $emit('update-alt-text', fileData.alt_text)" :close-on-interact-outside="false">
4+
}" @update:open="o => !o" :close-on-interact-outside="false">
55
<Popover.Trigger aria-hidden="true"
66
class="absolute top-1 left-1 p-1 bg-dark-800 ring-1 ring-white/5 text-white text-xs rounded size-6">
77
<iconify-icon icon="tabler:alt" width="none" class="size-4" />
@@ -26,10 +26,12 @@
2626
placeholder="Describe this image for screen readers"
2727
rows="5"
2828
class="w-full p-2 text-sm prose prose-invert bg-dark-900 rounded focus:!ring-0 !ring-none !border-none !outline-none placeholder:text-zinc-500 appearance-none focus:!border-none focus:!outline-none" />
29+
<Popover.CloseTrigger :as-child="true">
2930
<Button theme="secondary" @click="$emit('update-alt-text', fileData.alt_text)" class="w-full"
3031
:loading="fileData.uploading">
3132
<span>Edit</span>
3233
</Button>
34+
</Popover.CloseTrigger>
3335
</Popover.Content>
3436
</Popover.Positioner>
3537
</Popover.Root>

0 commit comments

Comments
 (0)