[ENG-1702] Fix space for command palette (#2269)

* Fix space for command palette

* Update index.tsx
This commit is contained in:
ameer2468
2024-04-01 21:30:44 +03:00
committed by GitHub
parent e5a0d49732
commit f53e6c98ad
3 changed files with 6 additions and 14 deletions

View File

@@ -169,8 +169,9 @@ export const useShortcut = (shortcut: Shortcuts, func: (e: KeyboardEvent) => voi
// useKeys doesn't like readonly
useKeys(keys as string[], (e) => {
if (!visible) return;
if (!import.meta.env.DEV) e.preventDefault();
return func(e);
}, {
when: visible
});
};