Skip to content

Commit

Permalink
fix: Capital F not working at SearchModal (#268)
Browse files Browse the repository at this point in the history
Signed-off-by: Johannes Groß <mail@gross-johannes.de>
  • Loading branch information
jo-gross authored May 6, 2024
1 parent a62bce9 commit 56c23e1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pages/workspaces/[workspaceId]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ export default function OverviewPage() {
useEffect(() => {
const handleSearchShortCut = (event: any) => {
if (event.shiftKey && event.key === 'F') {
modalContext.openModal(<SearchModal showStatisticActions={showStatisticActions} />);
if (!(document.querySelector('#globalModal') as any)?.checked) {
modalContext.openModal(<SearchModal showStatisticActions={showStatisticActions} />);
}
}
};
window.addEventListener('keypress', handleSearchShortCut);
Expand Down

0 comments on commit 56c23e1

Please sign in to comment.