From f562fcd466169748b6ab00f917e8061f00f83b9e Mon Sep 17 00:00:00 2001 From: Dakshesh Jain <65905942+dakshesh14@users.noreply.github.com> Date: Thu, 10 Aug 2023 16:02:10 +0530 Subject: [PATCH] refactor: both delete or backspace can be used to open modal (#1829) * refactor: both delete or backspace can be used to open modal * fix: 'Bulk Issue Delete' modal will open on single click --- apps/app/components/command-palette/command-pallette.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/app/components/command-palette/command-pallette.tsx b/apps/app/components/command-palette/command-pallette.tsx index be54c8f75..bead7e2e9 100644 --- a/apps/app/components/command-palette/command-pallette.tsx +++ b/apps/app/components/command-palette/command-pallette.tsx @@ -104,9 +104,6 @@ export const CommandPalette: React.FC = () => { } else if (keyPressed === "b") { e.preventDefault(); toggleCollapsed(); - } else if (keyPressed === "backspace") { - e.preventDefault(); - setIsBulkDeleteIssuesModalOpen(true); } } else { if (keyPressed === "c") { @@ -123,6 +120,9 @@ export const CommandPalette: React.FC = () => { setIsCreateCycleModalOpen(true); } else if (keyPressed === "m") { setIsCreateModuleModalOpen(true); + } else if (keyPressed === "backspace" || keyPressed === "delete") { + e.preventDefault(); + setIsBulkDeleteIssuesModalOpen(true); } } },