Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

web: pressing escape key shouldn't exit fullscreen mode in firefox

Abdullah Attafc31b2a8d7a2
diff --git a/apps/web/src/components/dialog/index.tsx b/apps/web/src/components/dialog/index.tsx
index 1c4a48fcd..2a4f22a59 100644
--- a/apps/web/src/components/dialog/index.tsx
+++ b/apps/web/src/components/dialog/index.tsx
@@ -113,6 +113,13 @@ function BaseDialog(props: React.PropsWithChildren<DialogProps>) {
...props.sx
}}
+ onKeyDown={(e) => {
+ if (e.key === "Escape") {
+ e.preventDefault();
+ e.stopPropagation();
+ props.onClose?.();
+ }
+ }}
>
{props.showCloseButton && (
<Close