Skip to content

Commit

Permalink
fix: only disable KeyboardAvoidingView with shouldDisableKeyboardAvoi…
Browse files Browse the repository at this point in the history
…dingView param on preview tab
  • Loading branch information
Estevão Lucas committed Nov 19, 2018
1 parent fe42fc4 commit d7bd102
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/react-native/src/preview/components/OnDeviceUI/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export default class OnDeviceUI extends PureComponent {
});

// close the keyboard opened from a TextInput from story list or knobs
if (newTabOpen === 0) {
if (newTabOpen === PREVIEW) {
Keyboard.dismiss();
}
};
Expand Down Expand Up @@ -135,7 +135,7 @@ export default class OnDeviceUI extends PureComponent {
return (
<SafeAreaView style={style.flex}>
<KeyboardAvoidingView
enabled={!shouldDisableKeyboardAvoidingView}
enabled={!shouldDisableKeyboardAvoidingView || tabOpen !== PREVIEW}
behavior={IS_IOS ? 'padding' : null}
style={style.flex}
>
Expand Down

0 comments on commit d7bd102

Please sign in to comment.