Keyboard covers input when inside a react navigation bottom tab navigator
See original GitHub issueIssue Description
The problem is when Gifted Chat
is inside of a bottom tab navigator
from react-navigation
when I first focus the message box the keyboard covers the text input. Once I type the first letter the text input comes into view with the correct positioning.
This only happens when the GiftedChat
component is inside a bottom tab navigator
.
Everything works fine when the chat component is inside ONLY a stack navigator
.
It breaks again if inside a stack navigator
nested inside a tab navigator
.
Steps to Reproduce / Code Snippets
import { View } from 'react-native';
import { GiftedChat } from 'react-native-gifted-chat';
import { createAppContainer } from 'react-navigation';
import { createBottomTabNavigator } from 'react-navigation-tabs';
function ThreadScreen() {
return (
<View style={{ flex: 1, backgroundColor: 'red' }}>
<GiftedChat
messages={[]}
user={{
_id: 1,
}}
onSend={() => {}}
/>
</View>
);
}
const Navigator = createAppContainer(
createBottomTabNavigator({
Thread: {
screen: ThreadScreen,
},
})
);
function App() {
return <Navigator />;
}
export default App;
Expected Results
The input should not be covered by keyboard on focus.
Additional Information
- Nodejs version: 8.16.1
- React version: 16.9.0
- React Native version: 0.61.1
- react-native-gifted-chat version: 0.10.1
- Platform(s) (iOS, Android, or both?): iOS
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:21
Top Results From Across the Web
React native bottom tab bar pushing itself up when opening ...
by doing this, the bottom navigator was staying hidden behind the keyboard. however, the ScrollView containing TextInputs was not working ...
Read more >Hiding tab bar in specific screens - React Navigation
Sometimes we may want to hide the tab bar in specific screens in a stack navigator nested in a tab navigator. Let's say...
Read more >ios keyboard covers the input which is located in the bottom of ...
Coding example for the question ios keyboard covers the input which is located in the bottom of the screen-React Native.
Read more >How to dismiss keyboard with react-navigation in React Native ...
TextInput inside ScrollView# · 'never' (the default), tapping outside of the focused text input when the keyboard is up dismisses the keyboard.
Read more >Avoid Keyboard in React Native Like a Pro - Netguru
Screens with react-native-keyboard-manager and react-native-avoid-softinput are handling keyboard with similar effect - single line input's ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
/reopen
I am measuring the height of the Bottom TabBar in the following way:
Add hooks to the render-function:
And then wrap GiftedChat like this: