Skip to content

Commit

Permalink
Merge pull request #587 from applications-developer/master
Browse files Browse the repository at this point in the history
fix(keyboard height): fix on android & expo TextInput no show
  • Loading branch information
xcarpentier authored Oct 13, 2017
2 parents f50f16d + 5a39833 commit aa3b7df
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/GiftedChat.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ class GiftedChat extends React.Component {
}

getKeyboardHeight() {
if (Platform.OS === 'android') {
if (Platform.OS === 'android' && !this.props.forceGetKeyboardHeight) {
// For android: on-screen keyboard resized main container and has own height.
// @see https://developer.android.com/training/keyboard-input/visibility.html
// So for calculate the messages container height ignore keyboard height.
Expand Down Expand Up @@ -554,6 +554,7 @@ GiftedChat.defaultProps = {
}),
onInputTextChanged: null,
maxInputLength: null,
forceGetKeyboardHeight: false,
};

GiftedChat.propTypes = {
Expand Down Expand Up @@ -600,6 +601,7 @@ GiftedChat.propTypes = {
keyboardShouldPersistTaps: PropTypes.oneOf(['always', 'never', 'handled']),
onInputTextChanged: PropTypes.func,
maxInputLength: PropTypes.number,
forceGetKeyboardHeight: PropTypes.bool,
};

export {
Expand Down

0 comments on commit aa3b7df

Please sign in to comment.