If my code moves focus to a particular TextInput and I press a "button" (TouchableOpacity), the first press doesn't work. I guess that just moves focus out of the TextInput. Then the next press works. This doesn't seem like the expected behavior.
This same problem was brought up here, and they didn't actually find a solution to the actual problem, so I'm interested in an answer to this as well. https://github.com/facebook/react-native/issues/4229
set keyboardShouldPersistTaps of ScrollView to true
A TextInput with some related buttons and a list ,#8234 cannot help, especially when callback function of TextInput鈥榝ocus event make the list showed
Many scenarios where this behavior would be desirable, such as a login form, are not in a scroll view
+1
Hi there! This issue is being closed because it has been inactive for a while. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. Either way, we're automatically closing issues after a period of inactivity. Please do not take it personally!
If you think this issue should definitely remain open, please let us know. The following information is helpful when it comes to determining if the issue should be re-opened:
If you would like to work on a patch to fix the issue, contributions are very welcome! Read through the contribution guide, and feel free to hop into #react-native if you need help planning your contribution.
Setting contentProps={{keyboardDismissMode: 'interactive', keyboardShouldPersistTaps: 'handled'}} on the parent ScrollView fixes it for me. Got this from #4229 thanks to @antonKalinin.
In places such as LoginScreen or simple TextInput with TouchableOpacity, it still requires double tap(iOS) to call the function. anyone found any work around other than ScrollView or ListView ?
Most helpful comment
8234 solves my problem
set
keyboardShouldPersistTapsofScrollViewtotrue