Skip to content

Commit

Permalink
fix: IOU - one character descriptions are not saved - the diacritic i…
Browse files Browse the repository at this point in the history
…nside a bold block doesn't work
  • Loading branch information
charles-liang committed May 10, 2024
1 parent 0214ef1 commit 2627931
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/MarkdownTextInput.web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ interface MarkdownTextInputProps extends TextInputProps {

interface MarkdownNativeEvent extends Event {
inputType: string;
data: string;
}

type Selection = {
Expand Down Expand Up @@ -329,8 +330,7 @@ const MarkdownTextInput = React.forwardRef<TextInput, MarkdownTextInputProps>(
return;
}
const nativeEvent = e.nativeEvent as MarkdownNativeEvent;

if (compositionRef.current && nativeEvent.inputType !== 'insertCompositionText') {
if (compositionRef.current && (nativeEvent.inputType !== 'insertCompositionText' || nativeEvent.data !== '*')) {
updateTextColor(divRef.current, e.target.innerText);
compositionRef.current = false;
return;
Expand Down

0 comments on commit 2627931

Please sign in to comment.