I'm using TextInput inside ScrollView and KeyboardAvoidingView but it require two time taps for submit text when keyboard is open.
for soluation i'm add keyboardShouldPersistTaps="always" but it not working.
render() {
return (
<View style={{flex: 1}}>
<KeyboardAvoidingView style={{flex:1}}>
<ScrollView keyboardShouldPersistTaps="always"
contentContainerStyle={{
paddingHorizontal: 10,
flexGrow : 1,
justifyContent : 'center',
alignItems:'center'}}>
<View style={{backgroundColor:'green', width:'100%', borderRadius:8, overflow:'hidden'}}>
<TextInput style={{margin:10}}/>
<TouchableOpacity onPress={() => {alert('alert')}}>
<Text>Submit</Text>
</TouchableOpacity>
</View>
</ScrollView>
</KeyboardAvoidingView>
</View>
)
}
How to fire on press event on single tap?