Skip to content
Permalink
Browse files

Remove height styling when keyboard closed (#16965)

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...
shauns authored and facebook-github-bot committed Jan 29, 2019
1 parent 7e8b810 commit 745484c892e40cfe15ded128f5a589edb28d8f6b
Showing with 1 addition and 1 deletion.
  1. +1 −1 Libraries/Components/Keyboard/KeyboardAvoidingView.js
@@ -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.

0 comments on commit 745484c

Please sign in to comment.
You can’t perform that action at this time.