Skip to content

Commit 0735317

Browse files
kosmydelcursoragent
andcommitted
fix(ios): reset EmptyLayoutMetrics on Fabric view recycle
Value-init `{}` is not EmptyLayoutMetrics, so recycled display:none views could keep self.hidden=YES when reused for visible content. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 1cdf784 commit 0735317

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,7 @@ - (void)prepareForRecycle
722722
_isJSResponder = NO;
723723
_removeClippedSubviews = NO;
724724
_reactSubviews = [NSMutableArray new];
725-
_layoutMetrics = {};
725+
_layoutMetrics = EmptyLayoutMetrics;
726726
}
727727

728728
- (void)setPropKeysManagedByAnimated_DO_NOT_USE_THIS_IS_BROKEN:(NSSet<NSString *> *_Nullable)props

0 commit comments

Comments
 (0)