We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cf58201 commit 56985bdCopy full SHA for 56985bd
1 file changed
src/common/shortcut/shortcut.hook.tsx
@@ -1,4 +1,5 @@
1
import { isMacOS, isWindowsOrLinux } from '@/common/helpers/platform.helpers';
2
+import { useModalDialogContext } from '@/core/providers';
3
import { useEffect } from 'react';
4
5
export interface ShortcutHookProps {
@@ -21,7 +22,13 @@ const useShortcut = ({
21
22
callback,
23
noModifier,
24
}: ShortcutHookProps) => {
25
+ const { modalDialog } = useModalDialogContext();
26
+
27
const handleKeyPress = (event: KeyboardEvent) => {
28
+ if (modalDialog.isOpen) {
29
+ return;
30
+ }
31
32
const isMetaKeyPressed = event.getModifierState('Meta');
33
const isCtrlKeyPressed = event.getModifierState('Control');
34
0 commit comments