A framework for building native applications using React
Fix keyboard navigation for FlatList with `removeClippedSubviews` enabled (#50105)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/50105 Pull Request resolved: https://github.com/facebook/react-native/pull/49543 When using `ReactScrollView` or `ReactHorizontalScrollView` Views with `removeClippedSubviews` keyboard navigation didn't work. This is because keyboard navigation relies on Android's View hierarchy to find the next focusable element. With `removeClippedSubviews` the next View might've been removed from the hierarchy. With this change we delegate the job of figuring out the next focusable element to the Shadow Tree, which will always contain layout information of the next element of the ScrollView. We then prevent the clipping of the topmost parent of the next focusable view to lay out the entire containing element in case we have some necessary context in the parent Changelog: [Android][Fixed] - Fix keyboard navigation on lists with `removeClippedSubviews` enabled Reviewed By: joevilches Differential Revision: D71324219 fbshipit-source-id: b55b7735a30714b2a5e1c9e0ed4ae84ab43f6694
J
Jorge Cabiedes Acosta committed
fc9f2fe0ea20d6e73be8fdf4eb47affaddea6427
Parent: d569710
Committed by Facebook GitHub Bot <[email protected]>
on 4/15/2025, 1:08:36 AM