Skip to content

Commit

Permalink
Update KeyboardAvoidingView.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Gregoirevda committed Jun 10, 2024
1 parent 06f0a2b commit 91e7072
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,9 @@ class KeyboardAvoidingView extends React.Component<Props, State> {

_updateBottomIfNecessary = async () => {
if (this._keyboardEvent == null) {
if (Keyboard.isVisible()) {
this._setBottom(Keyboard.metrics().height);
const keyboardMetrics = Keyboard.metrics();
if (Keyboard.isVisible() && keyboardMetrics?.height) {
this._setBottom(keyboardMetrics.height);
} else {
this._setBottom(0);
}
Expand Down

0 comments on commit 91e7072

Please sign in to comment.