fix(frontend): let Escape leave the tag search field in the viewer
deploy / deploy (push) Successful in 17s
deploy / deploy (push) Successful in 17s
The viewer's tag picker focuses its search input on `e`, but the input swallowed every key and the viewer's own handler bails on input targets, so there was no keyboard way out of the field. Escape now blurs the input back to the page, restoring arrow/Escape navigation in the viewer (a second Escape then closes it). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -109,6 +109,12 @@
|
||||
void handleRemove(tag.id);
|
||||
assignedFocusIdx = Math.min(assignedFocusIdx, filteredAssigned.length - 2);
|
||||
}
|
||||
} else if (e.key === 'Escape') {
|
||||
// Let the keyboard leave the field: blur back to the page so arrow keys
|
||||
// and Escape reach the viewer again (e.g. a second Esc closes it).
|
||||
e.preventDefault();
|
||||
assignedFocusIdx = -1;
|
||||
(e.currentTarget as HTMLInputElement).blur();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
['& | ! ( )', 'Insert an operator (filter only)'],
|
||||
['Ctrl+Enter', 'Apply the filter'],
|
||||
['Ctrl+Backspace', 'Reset the filter'],
|
||||
['Esc', 'Close']
|
||||
['Esc', 'Leave the field / close']
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user