diff --git a/Libraries/Components/Keyboard/KeyboardAvoidingView.js b/Libraries/Components/Keyboard/KeyboardAvoidingView.js index 6a343d895c8ca5..da9e6a2c700b26 100644 --- a/Libraries/Components/Keyboard/KeyboardAvoidingView.js +++ b/Libraries/Components/Keyboard/KeyboardAvoidingView.js @@ -93,6 +93,13 @@ class KeyboardAvoidingView extends React.Component { const keyboardY = keyboardFrame.screenY - (this.props.keyboardVerticalOffset ?? 0); + if (this.props.behavior === 'height') { + return Math.max( + this.state.bottom + frame.y + frame.height - keyboardY, + 0, + ); + } + // Calculate the displacement needed for the view such that it // no longer overlaps with the keyboard return Math.max(frame.y + frame.height - keyboardY, 0);