From f15e06b8f380ab17e930c742a854e4e84f520601 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Sat, 15 Jun 2024 23:24:20 +0200 Subject: [PATCH] Fix compose bugs 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 | 3 ++- src/features/compose/editor/plugins/state-plugin.tsx | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/features/compose/components/compose-form.tsx b/src/features/compose/components/compose-form.tsx index e09f8bb4a..64aba3425 100644 --- a/src/features/compose/components/compose-form.tsx +++ b/src/features/compose/components/compose-form.tsx @@ -302,8 +302,9 @@ const ComposeForm = ({ id, shouldCondense, autoFocus, clickab
{renderButtons()} diff --git a/src/features/compose/editor/plugins/state-plugin.tsx b/src/features/compose/editor/plugins/state-plugin.tsx index 7a8262262..78742326a 100644 --- a/src/features/compose/editor/plugins/state-plugin.tsx +++ b/src/features/compose/editor/plugins/state-plugin.tsx @@ -79,7 +79,7 @@ const StatePlugin: React.FC = ({ composeId, isWysiwyg }) => { }, 750), []); useEffect(() => { - editor.registerUpdateListener(({ editorState }) => { + return editor.registerUpdateListener(({ editorState }) => { const plainText = editorState.read(() => $getRoot().getTextContent()); let text = plainText; if (isWysiwyg) {