Skip to content

Commit

Permalink
Merge pull request #1395 from argos-ci/fix-hotkeys-capture
Browse files Browse the repository at this point in the history
fix: make hotkeys work even if button is focused
  • Loading branch information
gregberge authored Oct 12, 2024
2 parents 88f8ff7 + d086b15 commit 2e0a254
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/frontend/src/pages/Build/BuildHotkeys.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,9 @@ export function useBuildHotkey(

callback(event);
};
document.addEventListener("keydown", listener);
document.addEventListener("keydown", listener, { capture: true });
return () => {
document.removeEventListener("keydown", listener);
document.removeEventListener("keydown", listener, { capture: true });
};
}, [hotkey, refs]);
return hotkey;
Expand Down

0 comments on commit 2e0a254

Please sign in to comment.