From b8a19ff794e59d3aeceb1cb9dd4d4c425a6865d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Thu, 13 Jun 2024 23:46:41 +0200 Subject: [PATCH] Fix text compose MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- src/features/compose/components/compose-form.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/features/compose/components/compose-form.tsx b/src/features/compose/components/compose-form.tsx index 9dd2cee37..e09f8bb4a 100644 --- a/src/features/compose/components/compose-form.tsx +++ b/src/features/compose/components/compose-form.tsx @@ -140,10 +140,10 @@ const ComposeForm = ({ id, shouldCondense, autoFocus, clickab if (!canSubmit) return; e?.preventDefault(); - // dispatch(changeCompose(id, text)); - dispatch(submitCompose(id, { history })); + dispatch(submitCompose(id, { history })).then(() => { + editorRef.current?.dispatchCommand(CLEAR_EDITOR_COMMAND, undefined); + }).catch(() => {}); - editorRef.current?.dispatchCommand(CLEAR_EDITOR_COMMAND, undefined); }; const onSuggestionsClearRequested = () => {