question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Gap between Keyboard & text input component when using createBottomTabNavigator

See original GitHub issue

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
        }}
      />
    );
  }

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:9
  • Comments:5

github_iconTop GitHub Comments

2reactions
untillacommented, 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

0reactions
sohailmadancommented, Jan 5, 2022

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Gap between Keyboard & text input component when using ...
Issue Description I used createBottomTabNavigator from react-navigation to create a bottom tab bar. One of the tabs is messages tab, ...
Read more >
React native bottom tab bar pushing itself up when opening ...
If you are using a TextInput in the search bar you could hide the bottom tab when TextInput is focused (and the keyboard...
Read more >
Bottom Tabs Navigator | React Navigation
A simple tab bar on the bottom of the screen that lets you switch between different routes. Routes are lazily initialized -- their...
Read more >
react navigation keyboardavoidingview - You.com | The AI ...
I have a TextInput at the bottom of the mobile screen and when user gets into focus of it , keyboard view is...
Read more >
react-navigation-tab | React Native Tutorial - GitHub Pages
Using the createBottomTabNavigator, let's create a tab navigation example that switches to three screens: Home, Chat, and Settings. base = Screen. At first,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found