From 02fd094e3b389825550e4b70156d9c26da8340b7 Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Mon, 6 Jul 2026 23:52:35 -0700 Subject: [PATCH] fix(macos): don't reset prop-derived state during Fabric view recycle `prepareForRecycle` reset `allowsVibrancy`, `acceptsFirstMouse`, and `mouseDownCanMoveWindow` to defaults on macOS. But `_props` is preserved across recycle and `updateProps:` diffs against it, so resetting the native state without resetting `_props` desyncs them: a recycled view reused by a node with the same non-default value gets no diff and stays stuck at the default. Rely on the preserved-`_props` diff like the iOS path does. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Mounting/ComponentViews/View/RCTViewComponentView.mm | 5 ----- 1 file changed, 5 deletions(-) diff --git a/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm b/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm index b659eaee3601..9bb8c405c4e4 100644 --- a/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +++ b/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm @@ -762,11 +762,6 @@ - (void)prepareForRecycle _removeClippedSubviews = NO; _reactSubviews = [NSMutableArray new]; _accessibilityElements = [NSMutableArray new]; -#if TARGET_OS_OSX // [macOS - _allowsVibrancy = NO; - self.acceptsFirstMouse = NO; - self.mouseDownCanMoveWindow = YES; -#endif // macOS] } - (void)setPropKeysManagedByAnimated_DO_NOT_USE_THIS_IS_BROKEN:(NSSet *_Nullable)props