Skip to content

Commit 9a1316f

Browse files
committed
TextInput should only blur on submit if not composing
1 parent 5d730b7 commit 9a1316f

File tree

1 file changed

+1
-1
lines changed
  • packages/react-native-web/src/exports/TextInput

1 file changed

+1
-1
lines changed

packages/react-native-web/src/exports/TextInput/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ const TextInput = forwardRef<TextInputProps, *>((props, forwardedRef) => {
283283
}
284284
}
285285

286-
if (!e.isDefaultPrevented() && e.key === 'Enter' && !e.shiftKey) {
286+
if (!e.isDefaultPrevented() && e.key === 'Enter' && !e.shiftKey && !e.nativeEvent.isComposing) {
287287
if ((blurOnSubmit || !multiline) && onSubmitEditing) {
288288
// prevent "Enter" from inserting a newline
289289
e.preventDefault();

0 commit comments

Comments
 (0)