Skip to content

Commit

Permalink
fix(fabric): don't import RCTView into RCTViewComponentView
Browse files Browse the repository at this point in the history
  • Loading branch information
Saadnajmi committed Nov 29, 2024
1 parent 96881d7 commit 2d4d460
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#import <React/RCTCursor.h> // [macOS]
#import <React/RCTLocalizedString.h>
#import <react/featureflags/ReactNativeFeatureFlags.h>
#import <React/RCTView.h> // [macOS]
#import <react/renderer/components/view/ViewComponentDescriptor.h>
#import <react/renderer/components/view/ViewEventEmitter.h>
#import <react/renderer/components/view/ViewProps.h>
Expand Down Expand Up @@ -673,8 +672,8 @@ - (RCTUIView *)betterHitTest:(CGPoint)point withEvent:(UIEvent *)event // [macOS
// Native macOS views require the point to be in the super view coordinate space for hit testing. [macOS]
CGPoint hitTestPoint = point;
#if TARGET_OS_OSX // [macOS
// Paper and Fabric components use the target view coordinate space for hit testing
if ([subview isKindOfClass:[RCTView class]] || [subview isKindOfClass:[RCTViewComponentView class]]) {
// Fabric components use the target view coordinate space for hit testing
if ([subview isKindOfClass:[RCTViewComponentView class]]) {
hitTestPoint = [subview convertPoint:point fromView:self];
}
#endif // macOS]
Expand Down

0 comments on commit 2d4d460

Please sign in to comment.