Skip to content

Commit

Permalink
refactor: 🐛 Make alt text editor close when saving
Browse files Browse the repository at this point in the history
  • Loading branch information
CPlusPatch committed Nov 4, 2024
1 parent 3532d5f commit d6fe8db
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/composer/uploader/alt-text-editor.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<Popover.Root :positioning="{
strategy: 'fixed',
}" @update:open="o => !o && $emit('update-alt-text', fileData.alt_text)" :close-on-interact-outside="false">
}" @update:open="o => !o" :close-on-interact-outside="false">
<Popover.Trigger aria-hidden="true"
class="absolute top-1 left-1 p-1 bg-dark-800 ring-1 ring-white/5 text-white text-xs rounded size-6">
<iconify-icon icon="tabler:alt" width="none" class="size-4" />
Expand All @@ -26,10 +26,12 @@
placeholder="Describe this image for screen readers"
rows="5"
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" />
<Popover.CloseTrigger :as-child="true">
<Button theme="secondary" @click="$emit('update-alt-text', fileData.alt_text)" class="w-full"
:loading="fileData.uploading">
<span>Edit</span>
</Button>
</Popover.CloseTrigger>
</Popover.Content>
</Popover.Positioner>
</Popover.Root>
Expand Down

0 comments on commit d6fe8db

Please sign in to comment.