File tree Expand file tree Collapse file tree
packages/react-native/React/Fabric/Mounting/ComponentViews/View Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -723,6 +723,13 @@ - (void)prepareForRecycle
723723 _removeClippedSubviews = NO ;
724724 _reactSubviews = [NSMutableArray new ];
725725 _layoutMetrics = {};
726+
727+ // Reset accessibilityViewIsModal so it does not leak across recycled views.
728+ // updateProps only writes this property when (oldProps != newProps); after a
729+ // view is recycled _props resets to the default (NO), so a recycled view that
730+ // is reused without the prop keeps the stale YES and traps VoiceOver / UI
731+ // automation against a now-unrelated subtree (empty accessibility tree).
732+ self.accessibilityElement .accessibilityViewIsModal = NO ;
726733}
727734
728735- (void )setPropKeysManagedByAnimated_DO_NOT_USE_THIS_IS_BROKEN : (NSSet <NSString *> *_Nullable)props
You can’t perform that action at this time.
0 commit comments