Open
Description
Environment
react-native -v:
6.14.15
npm ls react-native-macos:
serial@0.0.1 /Users/jim/development/mac/serial
└── react-native-macos@0.64.29
node -v:
v14.18.1
npm -v:
6.14.15
yarn --version:
1.22.17
xcodebuild -version:
Xcode 13.2.1
Build version 13C100
Steps to reproduce the bug
I have a single TextInput in my app, and I never want it to lose focus, so I set blurOnSubmit={false}
.
I want to get events when the Enter/Return keys are hit.
<TextInput
ref={inputRef}
style={styles.input}
autoFocus={true}
onChangeText={setText}
onSubmitEditing={onSubmitEditing}
value={text}
blurOnSubmit={false}
/>
WIth this configuration, I don't get onSubmitEditing
events. If I turn off blurOnSubmit
, I get them.
Feels like a bug, but maybe I'm missing how to do this correctly.
Expected Behavior
TextInput keeps focus, and emits an event when enter key is hit.
Actual Behavior
No events from enter key.
Reproducible Demo
Here's a snack that works in expo. This fails on macOS.
Additional context
No response