Imagine simple ScrollView with multiple TextInputs like
<ScrollView style={styles.container}>
<TextInput style={styles.input} />
<TextInput style={styles.input} />
</ScrollView>
When I enter first input, keyboard opens and I can type text. When I want to change to second input I need to twice tap - first type closes keyboard and only second tap opens the keyboard for second input.
One solution is to use keyboardShouldPersistTaps={true}
- switching works fine however then keyboard is not closed at all and the keyboard can cover some of the later inputs (or buttons).
I can also use keyboardDismissMode
however that just close keyboard on drag.
My question is how to combine those two behaviour - into IMHO the best user experience - when I click another input, the focus is changed immediately without reopening keyboard and when I tap somewhere else the keyboard is closed?
I am using RN0.22 and sample application is available at https://rnplay.org/apps/kagpGw
UPDATE - This problem might have been solved in RN 0.40 - see https://github.com/facebook/react-native/commit/552c60192172f6ec503181c060c08bbc5cbcc5a4