From f1c3e12ea46120df58a09c8e7afc3787899abe95 Mon Sep 17 00:00:00 2001 From: Matheus Baldissara Date: Mon, 5 Feb 2024 11:36:52 -0300 Subject: [PATCH] Prevent card opening when deleting --- frontend/src/components/menu.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/menu.jsx b/frontend/src/components/menu.jsx index aa839c0..5e92501 100644 --- a/frontend/src/components/menu.jsx +++ b/frontend/src/components/menu.jsx @@ -35,7 +35,8 @@ export function Menu(props) { props.onClose(); } - function handleOptionConfirmation() { + function handleOptionConfirmation(e) { + e.stopImmediatePropagation(); confirmationPromptCb()(); setConfirmationPromptCb(null); props.onClose(); @@ -80,7 +81,7 @@ export function Menu(props) { onClick={handleOptionConfirmation} id="confirm-btn" onKeyDown={(e) => - handleKeyDown(e, () => handleOptionConfirmation(), handleCancel) + handleKeyDown(e, () => handleOptionConfirmation(e), handleCancel) } > Are you sure?