Skip to content

Commit

Permalink
fix: IOU - one character descriptions are not saved
Browse files Browse the repository at this point in the history
  • Loading branch information
charles-liang committed May 9, 2024
1 parent 6452f69 commit 0214ef1
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 @@ -328,15 +328,15 @@ const MarkdownTextInput = React.forwardRef<TextInput, MarkdownTextInputProps>(
if (!divRef.current || !(e.target instanceof HTMLElement)) {
return;
}
const nativeEvent = e.nativeEvent as MarkdownNativeEvent;

if (compositionRef.current) {
if (compositionRef.current && nativeEvent.inputType !== 'insertCompositionText') {
updateTextColor(divRef.current, e.target.innerText);
compositionRef.current = false;
return;
}

let text = '';
const nativeEvent = e.nativeEvent as MarkdownNativeEvent;
switch (nativeEvent.inputType) {
case 'historyUndo':
text = undo(divRef.current);
Expand Down

0 comments on commit 0214ef1

Please sign in to comment.