We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e43f7c commit 2200f86Copy full SHA for 2200f86
packages/kit-headless/src/components/modal/modal.tsx
@@ -88,6 +88,11 @@ export const Modal = component$((props: ModalProps) => {
88
{...props}
89
role={props.alert === true ? 'alertdialog' : 'dialog'}
90
ref={modalRefSig}
91
+ onKeyDown$={(event) => {
92
+ if (event.key === 'Escape') {
93
+ showSig.value = false;
94
+ }
95
+ }}
96
onClick$={(event) => closeOnBackdropClick$(event)}
97
>
98
<Slot />
0 commit comments