Skip to content

Commit 0214ef1

Browse files
committed
fix: IOU - one character descriptions are not saved
1 parent 6452f69 commit 0214ef1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/MarkdownTextInput.web.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,15 +328,15 @@ const MarkdownTextInput = React.forwardRef<TextInput, MarkdownTextInputProps>(
328328
if (!divRef.current || !(e.target instanceof HTMLElement)) {
329329
return;
330330
}
331+
const nativeEvent = e.nativeEvent as MarkdownNativeEvent;
331332

332-
if (compositionRef.current) {
333+
if (compositionRef.current && nativeEvent.inputType !== 'insertCompositionText') {
333334
updateTextColor(divRef.current, e.target.innerText);
334335
compositionRef.current = false;
335336
return;
336337
}
337338

338339
let text = '';
339-
const nativeEvent = e.nativeEvent as MarkdownNativeEvent;
340340
switch (nativeEvent.inputType) {
341341
case 'historyUndo':
342342
text = undo(divRef.current);

0 commit comments

Comments
 (0)