Skip to content

Commit

Permalink
Fix cursor positioning when changing text and styles at the same time
Browse files Browse the repository at this point in the history
  • Loading branch information
Skalakid committed Jul 3, 2024
1 parent 092775d commit a0c1dfa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/MarkdownTextInput.web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ const MarkdownTextInput = React.forwardRef<TextInput, MarkdownTextInputProps>(
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<any>;
Expand Down

0 comments on commit a0c1dfa

Please sign in to comment.