Enhance EmbeddedCheckoutPopup to prevent default behavior on escape key down (#278)

- Added an onEscapeKeyDown handler to the EmbeddedCheckoutPopup component to prevent default actions when the escape key is pressed, improving user experience and accessibility.
This commit is contained in:
Giancarlo Buomprisco
2025-06-13 09:59:51 +07:00
committed by GitHub
parent 406e683091
commit 2b21b7bed4

View File

@@ -65,6 +65,7 @@ function EmbeddedCheckoutPopup({
className={className}
onOpenAutoFocus={(e) => e.preventDefault()}
onInteractOutside={(e) => e.preventDefault()}
onEscapeKeyDown={(e) => e.preventDefault()}
>
<DialogTitle className={'hidden'}>Checkout</DialogTitle>
<div>{children}</div>