From a0c1dfa9c4b8648b06d20ab5b3f6d4ffe67fd445 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Ska=C5=82ka?= Date: Wed, 3 Jul 2024 15:01:36 +0200 Subject: [PATCH] Fix cursor positioning when changing text and styles at the same time --- src/MarkdownTextInput.web.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/MarkdownTextInput.web.tsx b/src/MarkdownTextInput.web.tsx index 1444d9b5..0f9db879 100644 --- a/src/MarkdownTextInput.web.tsx +++ b/src/MarkdownTextInput.web.tsx @@ -284,6 +284,7 @@ const MarkdownTextInput = React.forwardRef( default: text = parseText(divRef.current, parsedText, processedMarkdownStyle, nativeEvent.inputType === 'pasteText' ? contentSelection.current?.start : null).text; } + divRef.current.value = text; if (onChange) { const event = e as unknown as NativeSyntheticEvent;