From ebe2cb493e8cc64af6bbcf0b96c14963ea68d762 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Kruk?= Date: Fri, 5 Dec 2025 17:30:36 +0100 Subject: [PATCH] fix: hit test for components using legacy view manager --- .../RCTLegacyViewManagerInteropComponentView.mm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/react-native/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm b/packages/react-native/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm index bec2ac591837..d894a7835a66 100644 --- a/packages/react-native/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm +++ b/packages/react-native/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm @@ -287,4 +287,15 @@ - (void)handleCommand:(const NSString *)commandName args:(const NSArray *)args [_adapter handleCommand:(NSString *)commandName args:(NSArray *)args]; } +- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event +{ + UIView* result = [super hitTest:point withEvent:event]; + + if (result == self) { + return nil; + } + + return result; +} + @end