diff --git a/frontend/src/components/modal/SuggestionsPanel.vue b/frontend/src/components/modal/SuggestionsPanel.vue index e62fc8b..50779d5 100644 --- a/frontend/src/components/modal/SuggestionsPanel.vue +++ b/frontend/src/components/modal/SuggestionsPanel.vue @@ -21,14 +21,14 @@ v-show="store.byCategory[cat] && store.byCategory[cat].length" :label="labelFor(cat)" :items="store.byCategory[cat] || []" @accept="onAccept" @alias="onAlias" @remove-alias="onRemoveAlias" - @dismiss="store.dismiss" @undismiss="store.undismiss" + @dismiss="onDismiss" @undismiss="onUndismiss" /> @@ -57,9 +57,15 @@ const props = defineProps({ // so the same panel refreshes the right surface. See TagPanel. host: { type: Object, default: null }, }) -// 'accepted' lets the parent return focus to the tag input after a suggestion is -// applied (operator-asked 2026-06-08). -const emit = defineEmits(['accepted']) +// 'accepted'/'dismissed' let the parent return focus to the tag input after a +// suggestion is accepted OR rejected, so the operator keeps the keyboard flow on +// the input without re-clicking (operator-asked 2026-06-08, 2026-06-30). +const emit = defineEmits(['accepted', 'dismissed']) + +// Reject (✗) / un-reject (↶): apply the store change, then signal the parent to +// re-focus the tag input — same return-to-input behaviour as accept. +function onDismiss (s) { store.dismiss(s); emit('dismissed') } +function onUndismiss (s) { store.undismiss(s); emit('dismissed') } const store = useSuggestionsStore() const modalStore = useModalStore() const host = props.host || modalStore diff --git a/frontend/src/components/modal/TagPanel.vue b/frontend/src/components/modal/TagPanel.vue index 0e76142..a0619f6 100644 --- a/frontend/src/components/modal/TagPanel.vue +++ b/frontend/src/components/modal/TagPanel.vue @@ -28,6 +28,7 @@ :image-id="host.currentImageId" :host="host" @accepted="focusTagInput" + @dismissed="focusTagInput" />