Skip to content

Commit ebe2cb4

Browse files
committed
fix: hit test for components using legacy view manager
1 parent 253fdf4 commit ebe2cb4

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

packages/react-native/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,4 +287,15 @@ - (void)handleCommand:(const NSString *)commandName args:(const NSArray *)args
287287
[_adapter handleCommand:(NSString *)commandName args:(NSArray *)args];
288288
}
289289

290+
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event
291+
{
292+
UIView* result = [super hitTest:point withEvent:event];
293+
294+
if (result == self) {
295+
return nil;
296+
}
297+
298+
return result;
299+
}
300+
290301
@end

0 commit comments

Comments
 (0)