fix: break infinite notes loop when selecting "None of the above"
goNextOrSubmit() unconditionally reopened the notes field whenever the cursor sat on the "None of the above" slot, even after the user had already typed a note and pressed Enter. This trapped users in an endless loop where Enter always bounced back to notes mode. Add a `!states[currentIdx].notes` guard so the auto-open only fires when notes are still empty. Fixes #3502
This commit is contained in:
parent
6aaa244742
commit
f153745c4f
1 changed files with 3 additions and 1 deletions
|
|
@ -298,7 +298,9 @@ export async function showInterviewRound(
|
|||
// Auto-open the notes field when "None of the above" is selected
|
||||
// so the user can immediately provide a free-text explanation
|
||||
// instead of being trapped in a re-asking loop (bug #2715).
|
||||
if (!isMultiSelect(currentIdx) && states[currentIdx].cursorIndex === noneOrDoneIdx(currentIdx)) {
|
||||
// Only auto-open if the user hasn't already provided notes —
|
||||
// otherwise Enter from notes mode loops back here endlessly.
|
||||
if (!isMultiSelect(currentIdx) && states[currentIdx].cursorIndex === noneOrDoneIdx(currentIdx) && !states[currentIdx].notes) {
|
||||
states[currentIdx].notesVisible = true;
|
||||
focusNotes = true;
|
||||
loadStateToEditor();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue