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

Gap between Keyboard & text input component when using createBottomTabNavigator #1202

Closed
abhishrek opened this issue Apr 24, 2019 · 5 comments
Labels

Comments

@abhishrek
Copy link

abhishrek commented Apr 24, 2019

Issue Description

I used createBottomTabNavigator from react-navigation to create a bottom tab bar.
One of the tabs is messages tab, where I added the example chat code (given in readme)
When running this ios simulator, as soon as the keyboard shows up, there is a big gap between the keyboard and the text input component.

When no keyboard, its fine :
Screenshot 2019-04-24 at 6 34 26 AM

When click inside the text input box, and keyboard shows up :
Screenshot 2019-04-24 at 6 35 03 AM

Steps to Reproduce / Code Snippets

Run the example code given in readme in a tab within createBottomTabNavigator from react-navigation, on ios simulator.

Expected Results

No gap between keyboard and text input box

Additional Information

  • Nodejs version: 10.6.2
  • React version: 16.5.2
  • React Native version: 0.56.0
  • react-native-gifted-chat version: 0.7.3
  • Platform(s) (iOS, Android, or both?): ios
  • react-navigation: 2.12.1

props

render() {
    return (
      <GiftedChat
        messages={this.state.messages}
        onSend={messages => this.onSend(messages)}
        alwaysShowSend={true}
        user={{
          _id: 1
        }}
      />
    );
  }

@prozwang
Copy link

+1

@untilla
Copy link

untilla commented May 4, 2019

If you look to source code, you will see what only two constants are used to set up tab bar height:
const DEFAULT_HEIGHT = 49;
const COMPACT_HEIGHT = 29;

And if you put this value to bottomOffset parameter of GiftedChat - problem will be solved.

image

image

@stale
Copy link

stale bot commented Jul 3, 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 Jul 3, 2019
@stale stale bot closed this as completed Jul 10, 2019
@ethanyuwang
Copy link

@untilla its working for ios but not for android. there's still a gap when keyboard is up. how should i fix this?

@sohailmadan
Copy link

I am facing the same issue do we have any solution for it yet

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

5 participants