mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-01-30 06:12:03 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user