From 62f6c26c49f6dfc6230585827a23fc4b1a5dbbbc Mon Sep 17 00:00:00 2001 From: ilya-bkv Date: Thu, 4 May 2023 07:57:42 +0300 Subject: [PATCH] fix closr upload modal event --- .../Editor/EditorFloatingMenu/EditorFloatingMenu.tsx | 11 ++--------- .../Editor/UploadModal/UploadModalContent.tsx | 2 ++ 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/components/Editor/EditorFloatingMenu/EditorFloatingMenu.tsx b/src/components/Editor/EditorFloatingMenu/EditorFloatingMenu.tsx index cd903404..23f916b9 100644 --- a/src/components/Editor/EditorFloatingMenu/EditorFloatingMenu.tsx +++ b/src/components/Editor/EditorFloatingMenu/EditorFloatingMenu.tsx @@ -52,14 +52,7 @@ export const EditorFloatingMenu = (props: FloatingMenuProps) => { return ( <>
- @@ -82,7 +75,7 @@ export const EditorFloatingMenu = (props: FloatingMenuProps) => {
- + setSelectedMenuItem(null)} editor={props.editor} /> ) diff --git a/src/components/Editor/UploadModal/UploadModalContent.tsx b/src/components/Editor/UploadModal/UploadModalContent.tsx index e5a8c204..597d6ebc 100644 --- a/src/components/Editor/UploadModal/UploadModalContent.tsx +++ b/src/components/Editor/UploadModal/UploadModalContent.tsx @@ -14,6 +14,7 @@ import { verifyImg } from '../../../utils/verifyImg' type Props = { editor: Editor + closeCallback: () => void } export const UploadModalContent = (props: Props) => { @@ -103,6 +104,7 @@ export const UploadModalContent = (props: Props) => { showInput={true} onClose={() => { hideModal() + props.closeCallback() }} validate={(value) => verifyImg(value)} onSubmit={handleImageFormSubmit}