fix(fandom): match change-fandom modal focus + Enter to FandomPicker
CI / backend-lint-and-test (push) Successful in 26s
CI / lint (push) Successful in 2s
CI / frontend-build (push) Successful in 22s
CI / integration (push) Successful in 3m6s

The 'Fandom for <character>' dialog (FandomSetDialog) used plain autofocus and
had no Enter handling, so Enter re-opened the dropdown instead of submitting —
the same bug FandomPicker already fixed. Mirror that flow: parent v-dialogs
focus the field via @after-enter→focusSearch (reliable past the focus-trap);
capture-phase Enter Saves the changed selection instead of re-opening the menu;
Tab jumps to the new-fandom field; creating a fandom returns focus to the
dropdown so a single Enter saves it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-07 20:37:02 -04:00
parent 5bc8ef65ad
commit aaa375654b
3 changed files with 64 additions and 4 deletions
+6 -1
View File
@@ -87,8 +87,12 @@
@confirm="onDeleteTagConfirm"
/>
<v-dialog v-model="fandomDialogOpen" max-width="460">
<v-dialog
v-model="fandomDialogOpen" max-width="460"
@after-enter="fandomSetRef?.focusSearch?.()"
>
<FandomSetDialog
ref="fandomSetRef"
v-if="fandomTarget" :tag="fandomTarget"
@updated="onFandomUpdated" @cancel="fandomDialogOpen = false"
/>
@@ -152,6 +156,7 @@ function openTag(tagId) {
// Character fandom editing (dots-menu → FandomSetDialog).
const fandomDialogOpen = ref(false)
const fandomTarget = ref(null)
const fandomSetRef = ref(null)
function onSetFandom(card) {
fandomTarget.value = card
fandomDialogOpen.value = true