From 1c0d60613774979530e2eb596b5a603d0f7ffd2c Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Wed, 24 Apr 2024 01:57:37 +0100 Subject: [PATCH] Don't trim --- src/view/com/composer/text-input/TextInput.web.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/view/com/composer/text-input/TextInput.web.tsx b/src/view/com/composer/text-input/TextInput.web.tsx index fd99c97aa6..013c05c6cf 100644 --- a/src/view/com/composer/text-input/TextInput.web.tsx +++ b/src/view/com/composer/text-input/TextInput.web.tsx @@ -185,7 +185,7 @@ export const TextInput = React.forwardRef(function TextInputImpl( }, onUpdate({editor: editorProp}) { const json = editorProp.getJSON() - const newText = editorJsonToText(json) + const newText = editorJsonToText(json).trimEnd() // Otherwise we have \n\n at the end const mayBePaste = window.event?.type === 'paste' const newRt = new RichText({text: newText})