9

My keyboard always dismisses instantly when I tap on the textInput. This only happens on Android.

It's strange that I've tried removing all irrelevant codes to textInput only, but the problem still exists. This only happens to one page of my app.

  <View>
            <TextInput
              style={{
                paddingVertical: 0,
                textAlignVertical: 'center',
                height: height * 0.05,
                width: width * 0.4,
                fontSize: height * 0.027,
                color: '#E1E1F2',
                borderBottomWidth: 1,
                borderBottomColor: '#6B778A',
                justifyContent: 'center',
              }}
              placeholderTextColor={'#6B778A'}
              underlineColorAndroid='black'/>
  </View>

I think there is nothing wrong with the codes, I really need help.

screen record: media.giphy.com/media/Vc6AbKbMsnZX8ykKqR/giphy.gif

Pang
  • 101
  • 1
  • 3

2 Answers2

1

Probably your input is inside a ScrollView.

See React Native: Keyboard dismiss when changing focus in ScrollView for solution.

Martin Janeček
  • 560
  • 4
  • 20
1

it happens due to the react native screens , navigation stack and native dependency versions , just update them to the latest versions