From fddfbfe23d311afd3967af8e0904172ca1e5cc5d Mon Sep 17 00:00:00 2001 From: Lucas Oliveira Date: Mon, 10 Jun 2024 08:19:33 -0300 Subject: [PATCH] Removed function that prevents esc on codeAreaModal --- .../src/modals/codeAreaModal/index.tsx | 140 +++++++++--------- 1 file changed, 66 insertions(+), 74 deletions(-) diff --git a/src/frontend/src/modals/codeAreaModal/index.tsx b/src/frontend/src/modals/codeAreaModal/index.tsx index 2766853f8..e68592efa 100644 --- a/src/frontend/src/modals/codeAreaModal/index.tsx +++ b/src/frontend/src/modals/codeAreaModal/index.tsx @@ -146,83 +146,75 @@ export default function CodeAreaModal({ setCode(value); }, [value, open]); - const handlePreventEsc = (e: React.KeyboardEvent) => { - if (e.key === "Escape") { - e.preventDefault(); - } - }; - return ( -
handlePreventEsc(e)}> - - {children} - - {EDIT_CODE_TITLE} - - - -
-
- { - setCode(value); - }} - className="h-full w-full rounded-lg border-[1px] border-gray-300 custom-scroll dark:border-gray-600" - /> -
-
-
-

- {error?.detail?.error} -

-
- - {error?.detail?.traceback} - -
+ + {children} + + {EDIT_CODE_TITLE} + + + +
+
+ { + setCode(value); + }} + className="h-full w-full rounded-lg border-[1px] border-gray-300 custom-scroll dark:border-gray-600" + /> +
+
+
+

+ {error?.detail?.error} +

+
+ + {error?.detail?.traceback} +
-
- -
- - -
+
+ +
+
+ + ); }