mirror of
https://github.com/cpvalente/ontime.git
synced 2026-09-02 04:49:05 +00:00
fix(finder): open from inputs and find milestones by cue
Two defects surfaced while reviewing the feature. The search shortcut was dead while any input had focus. The hotkey hook skips input elements by default, so the shortcut did nothing while editing an entry title, which is exactly when a user reaches for it. Opt out of that behaviour and drop the local handler that partially worked around it, so a single binding both opens and closes. Milestones were skipped by the cue search even though they carry a cue and display it in the rundown, so filtering by cue could never find one. They are already covered by the title search. Adds e2e coverage for both, and fires the shortcut from a focused input in the existing keyboard test so the first defect stays fixed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DzALEq9gGWwFmwTdgAiFcY
This commit is contained in:
@@ -39,16 +39,6 @@ export default function Finder({ isOpen, onClose }: FinderProps) {
|
||||
}, [activeEntry?.id]);
|
||||
|
||||
const navigate = (event: KeyboardEvent<HTMLDivElement>) => {
|
||||
/**
|
||||
* Mantine ignores hotkeys while an input is focused, so the global toggle
|
||||
* cannot close the finder once the user is typing
|
||||
*/
|
||||
if ((event.metaKey || event.ctrlKey) && event.key === 'f') {
|
||||
event.preventDefault();
|
||||
onClose();
|
||||
return;
|
||||
}
|
||||
|
||||
// all operations need results
|
||||
if (results.length === 0) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user