diff --git a/frontend/src/components/modal/FandomPicker.vue b/frontend/src/components/modal/FandomPicker.vue index e1ac0bf..8f1147e 100644 --- a/frontend/src/components/modal/FandomPicker.vue +++ b/frontend/src/components/modal/FandomPicker.vue @@ -2,22 +2,37 @@ Pick a fandom - +

Or create a new fandom:

- + + Create
@@ -34,7 +49,7 @@ diff --git a/frontend/src/components/modal/TagAutocomplete.vue b/frontend/src/components/modal/TagAutocomplete.vue index efc8768..a63625f 100644 --- a/frontend/src/components/modal/TagAutocomplete.vue +++ b/frontend/src/components/modal/TagAutocomplete.vue @@ -48,8 +48,17 @@ - - + + + @@ -74,10 +83,11 @@ const store = useTagStore() // the modal's stacked-layout breakpoint (ImageViewer.vue). matchMedia is // safe on plain HTTP (not a secure-context API). const inputRef = ref(null) -onMounted(() => { +function focusInput () { if (window.matchMedia?.('(max-width: 900px)')?.matches) return nextTick(() => inputRef.value?.focus?.()) -}) +} +onMounted(focusInput) // Single text input; no kind dropdown. Client-side mirror of the // backend's parse_kind_prefix lives below — kept in sync with @@ -89,6 +99,7 @@ const hits = ref([]) const highlight = ref(0) const listRef = ref(null) const fandomDialog = ref(false) +const fandomPickerRef = ref(null) let pendingNewName = null const KNOWN_KINDS = new Set([ @@ -178,6 +189,17 @@ function onFandomChosen (fandom) { }) pendingNewName = null reset() + // Return focus to the tag input so the keyboard flow continues straight into + // the next tag instead of dropping to (operator-flagged 2026-06-07). + focusInput() +} + +// Cancelling the fandom dialog drops the pending character and hands focus back +// to the tag input, same as a successful pick. +function onFandomCancel () { + fandomDialog.value = false + pendingNewName = null + focusInput() } function onEnter () {