fix: hotkeys was overlapping with the browser hotkeys

Signed-off-by: harkiratsm <multaniharry714@gmail.com>
This commit is contained in:
harkiratsm
2023-12-21 15:36:24 +05:30
parent ff64671e49
commit 519c645d06

View File

@ -85,7 +85,8 @@ export function CommandMenu({ open, onOpenChange }: CommandMenuProps) {
const currentPage = pages[pages.length - 1];
const toggleOpen = () => {
const toggleOpen = (e: KeyboardEvent) => {
e.preventDefault();
setIsOpen((isOpen) => !isOpen);
onOpenChange?.(!isOpen);