From 7a282b436318bffa974b1dea611a1ada938cd26b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=BD=20Thanh=20B=C3=A1ch?= <40271986+bachtly@users.noreply.github.com> Date: Wed, 4 Sep 2024 20:15:29 +0700 Subject: [PATCH] Fix bug bypassing verification in confirmation modal when pressing Enter (#6889) # Description Fix bug bypassing verification in the confirmation modal when pressing Enter # Demo Tested for webhook case (similar to other cases): 1. Press Enter when invalid verification => not delete webhook 2. Press Enter when valid verification => delete webhook https://github.com/user-attachments/assets/81aa0aaa-7361-4584-b7ae-b29525f33664 # Ref Fixes #6663 --- .../modules/ui/layout/modal/components/ConfirmationModal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/twenty-front/src/modules/ui/layout/modal/components/ConfirmationModal.tsx b/packages/twenty-front/src/modules/ui/layout/modal/components/ConfirmationModal.tsx index e2af7df603..cd35ec3472 100644 --- a/packages/twenty-front/src/modules/ui/layout/modal/components/ConfirmationModal.tsx +++ b/packages/twenty-front/src/modules/ui/layout/modal/components/ConfirmationModal.tsx @@ -93,7 +93,7 @@ export const ConfirmationModal = ({ setIsOpen(false); } }} - onEnter={onConfirmClick} + onEnter={!isValidValue ? undefined : onConfirmClick} isClosable={true} padding="large" >