KeyboardAvoidingView
infinitely updates on Android
#45192
Labels
API: Keyboard
Component: KeyboardAvoidingView
Issue: Author Provided Repro
This issue can be reproduced in Snack or an attached project.
Platform: Android
Android applications.
Description
The bottom state of the
KeyboardAvoidingView
component infinitely updates on Android. This is visible when inspectingKeyboardAvoidingView
's state in React Native DevTools, it continuously changes value. Or when a component is rendered just above the keyboard, it flickers and/or bounces up and down.Steps to reproduce
Prerequisites
example-1
. Reproduction 2 is on branchexample-2
. For each branch, checkout,yarn install
thenyarn android
.Reproduction 1
Reproduction 1 is a text input and footer fixed to the bottom wrapped in a
KeyboardAvoidingView
. While the bottom state changes, the change is so small (<1 px) that it is not noticeable in the UI.Steps
KeyboardAvoidingView
in the React Native DevTools.bottom
state in DevTools.bottom
state in DevTools.Expected behaviour
The
bottom
state should not continuously change.Actual behaviour
The
bottom
state continuously changes.Reproduction 2
Reproduction 2 is the same as reproduction 1 but with two screens to show the effect on the UI as the bottom state change is much larger.
Steps
Screen2
'sKeyboardAvoidingView
in the React Native DevTools.Expected behaviour
The
bottom
state should not continuously change. The footer should not be flickering.Actual behaviour
The
bottom
state continuously changes. The footer is flickering.React Native Version
0.74.2
Affected Platforms
Runtime - Android
Output of
npx react-native info
Stacktrace or Logs
Reproducer
https://github.com/winghouchan/react-native-keyboardavoidingview-infinite-update-mcve
Screenshots and Videos
Reproduction 1
react-native-keyboardavoidingview-infinite-update-mcve-1_1080p.mov
Reproduction 2
react-native-keyboardavoidingview-infinite-update-mcve-2_720p.mov
The text was updated successfully, but these errors were encountered: