Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Textinput is hidden on Android #578

Closed
jonathanroze opened this issue Sep 19, 2017 · 15 comments
Closed

Textinput is hidden on Android #578

jonathanroze opened this issue Sep 19, 2017 · 15 comments
Labels

Comments

@jonathanroze
Copy link

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
@bitcoinvsalts
Copy link

same issue on android too

@jonathanroze
Copy link
Author

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 !

@pulpdood
Copy link

I have a similar issue
image

@davista123
Copy link

davista123 commented Nov 15, 2017

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

@hironarita
Copy link

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

@desaawa
Copy link

desaawa commented Nov 21, 2017

Thanks @davista123. Works great!

@blackavec
Copy link

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

@xcarpentier
Copy link
Collaborator

@blackavec
Copy link

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

@xcarpentier
Copy link
Collaborator

Please see here: #680 (comment)

@duyluandethuong
Copy link

@davista123 solution still works extremely well with RN 0.55

@Tempest1000
Copy link

@davista123 worked perfectly, thank you thank you thank you

@tapz
Copy link

tapz commented Jan 17, 2019

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.

@stale
Copy link

stale bot commented Mar 18, 2019

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.

@stale stale bot added the wontfix label Mar 18, 2019
@stale stale bot closed this as completed Mar 25, 2019
@akhilsanker
Copy link

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

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests