I'm experiencing issue using TextInput
expected behaviour is that when I tap on it, it is focused and keyboard is shown, and when I tap around it (anywhere besides the input), the TextInput should blur and keyboard will go away. At present this doesn't happen, text input stays focused no matter where I click. Is this expected behaviour, if so how is it usually handled?
<Image source={require('../assets/background.jpg')} style={{width: undefined; height: undefined; flex: 1;}}>
<View>
<TextInput placeholder="Email" style={{ width: 200; height: 40; }} />
</View>
</Image>
Unfortunately that is expected behaviour.
You should wrap TextInput inside ScrollView
(and disable scrolling if needed) and then with property keyboardShouldPersistTaps="never"
.
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