mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix crash with nested FlatLists and fix edge case with nested views (#50827)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/50827 This diff addresses a crash caused by view duplication in React Native Android. The issue occurred when a view was not already clipped and was laid out again, resulting in duplicated views. This problem was particularly noticeable when using nested FlatLists, which triggered a custom focus search with an incomplete and buggy duplicated FlatList container view. The fix involves preventing the duplication of views by checking if a view is clipped already before laying it out again. Additionally, this diff includes two other improvements: - Preventing clipping issues: When a view is nested within a non-ReactClippingViewGroup ancestor, focus searching would fail due to the needUpdateClippingRecursive logic only running on instances of ReactClippingViewGroup. By excluding these ancestors, we ensure that the next focusable view can be properly excluded from being clipped. - Minor fix: A minor fix was made to prevent potential issues in deeply nested cases. - Add a Kill switch with a feature flag and mobile config combo. For Facebook we can kill through MC and for all other apps we can kill with the feature flag default value Changelog: [Internal] Reviewed By: joevilches Differential Revision: D73213775 fbshipit-source-id: 51a667a0c22eb35f0ec46ac4cbe430e2e62b407b
This commit is contained in:
1 parent
bbff754db3
commit
5a9023f7ab
29 files changed
+209
-80
No files matched your search
@@ -2344,10 +2344,10 @@ public class com/facebook/react/fabric/FabricUIManager : com/facebook/react/brid
|
||||
public fun dispatchCommand (IILjava/lang/String;Lcom/facebook/react/bridge/ReadableArray;)V
|
||||
public fun dispatchCommand (ILjava/lang/String;Lcom/facebook/react/bridge/ReadableArray;)V
|
||||
public fun findNextFocusableElement (III)Ljava/lang/Integer;
|
||||
public fun findRelativeTopMostParent (II)Ljava/lang/Integer;
|
||||
public fun getColor (I[Ljava/lang/String;)I
|
||||
public fun getEventDispatcher ()Lcom/facebook/react/uimanager/events/EventDispatcher;
|
||||
public fun getPerformanceCounters ()Ljava/util/Map;
|
||||
public fun getRelativeAncestorList (II)[I
|
||||
public fun getThemeData (I[F)Z
|
||||
public fun initialize ()V
|
||||
public fun invalidate ()V
|
||||
|
||||
Reference in new issue
Block a user