fix: disable hotkeys when project picker dropdown is open

When the project picker dropdown is open (via P key), pressing number keys
1-9 was incorrectly also triggering the board view's agent output modal
shortcuts. This fix adds a check for the project picker dropdown in the
isInputFocused() function, which disables all keyboard shortcuts registered
via useKeyboardShortcuts when the dropdown is visible.

The sidebar's project picker number key handler still works as expected
since it uses a separate event listener.
This commit is contained in:
Cody Seibert
2025-12-09 14:14:34 -05:00
parent 4527829bac
commit 9efebdbf83

View File

@@ -47,6 +47,14 @@ function isInputFocused(): boolean {
return true;
}
// Check for project picker dropdown being open
const projectPickerDropdown = document.querySelector(
'[data-testid="project-picker-dropdown"]'
);
if (projectPickerDropdown) {
return true;
}
return false;
}