React-native-gifted-chat: Textinput is hidden on Android

Created on 19 Sep 2017  路  16Comments  路  Source: FaridSafi/react-native-gifted-chat

Issue Description

Hi , i use react-native-gifted-chat on IOS and everythings work but on android, when i tap on the textinput, the keyboard rise up, le textinput too, everythings good but when i tap a letter, the textinput disappears (being the keyboard i suppose!

  • React Native version: 0.48.3
  • react-native-gifted-chat version: 0.2.7
  • Platform(s) (iOS, Android, or both?): Android
wontfix

Most helpful comment

The way I finally got it to work was by using react-native-keyboard-spacer in the same View as GiftedChat.

As suggested by @llamaluvr:

<View style={{flex: 1}}>
  <GiftedChat/>
  <KeyboardSpacer/>
</View

Works perfectly every time

All 16 comments

same issue on android too

I've fixed by this way :

In GiftedChat, comment in resetInputToolbar()

// this.notifyInputTextReset();
// const newComposerHeight = MIN_COMPOSER_HEIGHT;
// const newMessagesContainerHeight = this.getMessagesContainerHeightWithKeyboard(newComposerHeight);
// this.setState({
//   text: this.getTextFromProp(''),
//   composerHeight: newComposerHeight,
//   messagesContainerHeight: this.prepareMessagesContainerHeight(newMessagesContainerHeight),
// });

And in onInputSizeChanged comment all content !

After that it's working, and there are no side effect for me !

I have a similar issue
image

The way I finally got it to work was by using react-native-keyboard-spacer in the same View as GiftedChat.

As suggested by @llamaluvr:

<View style={{flex: 1}}>
  <GiftedChat/>
  <KeyboardSpacer/>
</View

Works perfectly every time

@davista123 Thanks! This solution works for me as well.

Thanks @davista123. Works great!

@davista123 love you man, i was spending 2 month to fix this bug

btw, it's not just issue with android, i have this issue with ios

Man I love you. Really. I wanna sick you!

@davista123 solution still works extremely well with RN 0.55

@davista123 worked perfectly, thank you thank you thank you

At least without Expo KeyboardSpacer just duplicates the behaviour in Android. I'm still seeing the keyboard covering the textinput randomly in Android. Would really, really like to have a solution to this.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Hi,
Any solution for this.
I am using custom input composer and the keyboard gets overlap with the input.

Thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

maharjanaman picture maharjanaman  路  3Comments

luisfuertes picture luisfuertes  路  3Comments

SytzeAndr picture SytzeAndr  路  3Comments

yazhengwang picture yazhengwang  路  3Comments

yogiben picture yogiben  路  3Comments