I have a TouchableOpacity and a TextInput inside a ScrollView, when the TextInput is focused an I press the TouchableOpacity I wanna fire first the onBlur and then the onPress. What happens? with keyboardShouldPersistTaps="never" the onPress won't execute at all and with "handled" the onBlur won't execute at all and the input won't lose focus. I noticed that with TouchableOpacity imported from 'react-native-gesture-handler' and not from 'react-native', and keyboardShouldPersistTaps to "never" both onPress and onBlur will execute but the problem here is that the onBlur comes after the onPress! Any solution?
<ScrollView keyboardShouldPersistTaps="never">
<TouchableOpacity onPress={() => console.log('press')}>
<Text>Click me</Text>
</TouchableOpacity>
<TextInput value={value} onBlur={() => console.log('blur')} />
</ScrollView>
expected output with field focused and pressing the touchable:
blur
press
edit: a more complicated scenario
//one component
<ScrollView keyboardShouldPersistTaps="handled">
<TextInput value={value} onBlur={() => console.log('blur')} />
<TextInput value={value} onBlur={() => console.log('blur')} />
<TextInput value={value} onBlur={() => console.log('blur')} />
</ScrollView>
//another component
<TouchableOpacity onPress={() => console.log('press')}>
<Text>Click me</Text>
</TouchableOpacity>
Both Components would be rendered inside a Bigger Component.