Open liamjones opened 3 years ago
This issue is stale because it has been open 365 days with no activity. Remove stale label or comment or this will be closed in 7 days.
Upgraded minimal repro to latest expo SDK, still happens (Expo SDK 44, RN 0.64.3): https://github.com/living-with/keyboard-avoiding-view-inside-flatlist-on-ios-bug
Any solution on this @liamjones
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.
Just rechecked this by updating the Snack to Expo 50 - still occurs.
@umerchaudhary34 Sorry, I missed your comment. No, I don't believe we have a workaround for this locally in our codebase atm.
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.
Just rechecked this by updating the Snack to Expo 51 - still occurs.
Description
If you have a KeyboardAvoidingView wrapping a vertical ScrollView you can still scroll the ScrollView while the keyboard is present. This is as expected.
However, if the above setup is rendered as an item inside a FlatList (for example, one being used as a horizontal pager) then you can no longer scroll the vertical ScrollView when the keyboard is present.
This only applies to iOS, you can still scroll the vertical ScrollView on Android (and I've confirmed it's not to do with the differing
behaviour
being set on KeyboardAvoidingView across platforms).React Native version:
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
Using the snack/repo below:
Expected Results
View scrolls vertically. This works on Android but not iOS.
Snack, code example, screenshot, or link to a repository:
https://snack.expo.io/@liam/github.com-living-with-keyboard-avoiding-view-inside-flatlist-on-ios-bug https://github.com/living-with/keyboard-avoiding-view-inside-flatlist-on-ios-bug
You can change the
insideFlatList
constant at the top of the App.tsx to see how the behaviour changes once the KeyboardAvoidingView is placed inside a FlatList.