Textinput is hidden on Android
jonathanroze opened this issue ยท 15 comments
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
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 !
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
Just added this issue on README:
https://github.com/FaridSafi/react-native-gifted-chat#questions
btw, it's not just issue with android, i have this issue with ios
Please see here: #680 (comment)
@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