iway1 / react-native-keyboard-avoider

MIT License
47 stars 3 forks source link

iOS ui jerk solution #7

Open DarrylKay opened 1 year ago

DarrylKay commented 1 year ago

This is a great package that really does fix a lot of the common issues found with the KeyboardAwareScrollView library. I found an issue on iOS that when you have multiple text inputs using the KeyboardAvoiderScrollView component, it kept moving the screen above the focused text input and hiding it behind the keyboard view.

For those that are facing similar issues, adding automaticallyAdjustKeyboardInsets to the KeyboardAvoiderScrollView removes this issue (at least for me it did).

<KeyboardAvoiderScrollView
  automaticallyAdjustKeyboardInsets
  contentContainerStyle={{ flexGrow: 1 }}
 >
  {children}
</KeyboardAvoiderScrollView>

Hope this helps someone when using this package

iway1 commented 1 year ago

oh nice thank you!

iway1 commented 1 year ago

Could you share your full code example if you don't mind? I'm actually not able to reproduce this issue and would like to fix it without workarounds (the constant workarounds are what make react-native-keyboard-aware-scrollview annoying to use)

Ideally this lib can just allow you to wrap your stuff in the scroll view and it'll just work as expected.

In my case I just have a full screen KeyboardAvoiderScrollView wrapping multiple text inputs and it scrolls the correct distance each time