Skip to content

Commit

Permalink
Prevent card opening when deleting
Browse files Browse the repository at this point in the history
  • Loading branch information
BaldissaraMatheus committed Feb 5, 2024
1 parent c4ef67e commit f1c3e12
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions frontend/src/components/menu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ export function Menu(props) {
props.onClose();
}

function handleOptionConfirmation() {
function handleOptionConfirmation(e) {
e.stopImmediatePropagation();
confirmationPromptCb()();
setConfirmationPromptCb(null);
props.onClose();
Expand Down Expand Up @@ -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?
Expand Down

0 comments on commit f1c3e12

Please sign in to comment.