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: https://github.com/facebook/react-native/pull/16965 Differential Revision: D13860208 Pulled By: cpojer fbshipit-source-id: 9ae7f81fd24999518a6ae85016d4f75dac3c4274
This commit is contained in:
parent
7e8b810499
commit
745484c892
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue