keyboard hide as soon as the textinput show

Issue Description

keyboard shows and hides as soon as the textinput shows. I use the renderBubble and textinput is on the renderBubble.It happens only on Android.

Steps to Reproduce / Code Snippets

<GiftedChat
user={{
_id: ‘1’,
}}
messagesContainerStyle={{paddingBottom: 40}}
inverted={false}
renderAvatarOnTop={true}
messages={this.state.messageData}
showUserAvatar={true}
renderBubble={(messages)=>this._renderBubble(messages)}
renderChatEmpty={this._renderChatEmpty}
renderAvatar={this._renderAvatar}
/>
{
Platform.OS === ‘android’ &&
}

_renderBubble(messages)
return (

<TextInput
ref={t=>this.sendInputText=t}
style={styles.sendTextInput}
placeholder=’enter your price…’
returnKeyType=’done’
blurOnSubmit={true}
onChangeText={this._onChangeText}
placeholderTextColor={‘#d5d5d5’}
/>

)
}

Expected Results

the textinput shows and I can enter the value.

Additional Information

  • Nodejs version: [FILL THIS OUT]
    v10.15.0
  • React version: [FILL THIS OUT]
    16.9.0
  • React Native version: [FILL THIS OUT]
    0.61.5
  • react-native-gifted-chat version: [FILL THIS OUT]
    0.13.0
  • Platform(s) (iOS, Android, or both?): [FILL THIS OUT]
    android
  • TypeScript version: [FILL THIS OUT]

1 possible answer(s) on “keyboard hide as soon as the textinput show

  1. I removed Platform.OS === 'android' && <KeyboardAvoidingView behavior="padding" /> and the issue was solved