I have a <TextInput>
that I'd like to submit when I tap the red Post button, a <TouchableHighlight>
. When the TextInput is focused, I finish typing and I tap on the Post button, the keyboard closes but the button doesn't register the tap.
I tried using the TextInput onBlur
event, but It doesn't give me the coordinates of the touch point, so I don't know if the touch point is actually over the button or not.
You need to add the property keyboardShouldPersistTaps={true} to your ScrollView.
Here is what the docs say :
keyboardShouldPersistTaps bool:
When false, tapping outside of the focused text input when the keyboard is up dismisses the keyboard. When true, the scroll view will not catch taps, and the keyboard will not dismiss automatically. The default value is false.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With