Skip to content

armgit / vaul

Public Imported from GitHub
0

A drawer component for React.

fix: esc shoud close drawer when modal is false (#425)

Emil Kowalskie2941a44ff9b
diff --git a/src/index.tsx b/src/index.tsx
index cee0ab5..1833003 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -779,12 +779,6 @@ export const Content = React.forwardRef<HTMLDivElement, ContentProps>(function (
return;
}
}}
- onEscapeKeyDown={(e) => {
- if (!modal) {
- e.preventDefault();
- return;
- }
- }}
onPointerMove={(event) => {
rest.onPointerMove?.(event);
if (!pointerStartRef.current) return;