From d2f85cabfcd2587f3b1aeea293e212648bea626b Mon Sep 17 00:00:00 2001 From: Tim Bradgate Date: Wed, 17 Jun 2026 01:34:47 +0100 Subject: [PATCH] Fix race condition in Add New Cue modal when submitting via Enter key When pressing Enter to submit the modal, it stayed open during the API call. After addNewCue resolved it called loadCues(), which updated the store and briefly made isDuplicateNewCue true, showing a spurious warning before hide() finally closed the modal. Clicking OK was unaffected because BVN auto-closes the modal at the first await in the @ok handler, before loadCues() runs. Fix: move hide() to before the await so both paths close the modal immediately on valid submission. resetNewForm() is removed from here because the @hidden event already wires it as a cleanup handler. Co-Authored-By: Claude Sonnet 4.6 --- .../src/components/show/config/cues/ScriptLineCueEditor.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/client-v3/src/components/show/config/cues/ScriptLineCueEditor.vue b/client-v3/src/components/show/config/cues/ScriptLineCueEditor.vue index 4b92c957..9c2853d8 100644 --- a/client-v3/src/components/show/config/cues/ScriptLineCueEditor.vue +++ b/client-v3/src/components/show/config/cues/ScriptLineCueEditor.vue @@ -401,13 +401,12 @@ async function onSubmitNew(event: Event): Promise { return; } submittingNewCue.value = true; + newCueModal.value?.hide(); await scriptStore.addNewCue({ cueType: newFormState.value.cueType!, ident: newFormState.value.ident!, lineId: newFormState.value.lineId!, }); - newCueModal.value?.hide(); - resetNewForm(); } // Edit cue modal