Skip to content

Commit

Permalink
Remove height styling when keyboard closed (#16965)
Browse files Browse the repository at this point in the history
Summary:
Closes #13754

Fixing previously reported bug #13754

Video here https://imgur.com/a/3IgqP

[GENERAL] [BUGFIX] [KeyboardAvoidingView] - Correct height behaviour when keyboard closed
Pull Request resolved: #16965

Differential Revision: D13860208

Pulled By: cpojer

fbshipit-source-id: 9ae7f81fd24999518a6ae85016d4f75dac3c4274
  • Loading branch information
Shaun Stanworth authored and facebook-github-bot committed Jan 29, 2019
1 parent 7e8b810 commit 745484c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Libraries/Components/Keyboard/KeyboardAvoidingView.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ class KeyboardAvoidingView extends React.Component<Props, State> {
switch (behavior) {
case 'height':
let heightStyle;
if (this._frame != null) {
if (this._frame != null && this.state.bottom > 0) {
// Note that we only apply a height change when there is keyboard present,
// i.e. this.state.bottom is greater than 0. If we remove that condition,
// this.frame.height will never go back to its original value.
Expand Down

0 comments on commit 745484c

Please # to comment.