mirror of
https://github.com/react/react-native.git
synced 2026-09-29 16:58:04 +08:00
fix hit test for components using legacy module interop (#54802)
Summary: This fixes hit tests in view using legacy module interop since the interop adds another view surrounding the actual view it needs to delegate the hit test to the actual component it wraps ## Changelog: [IOS] [FIXED] - Fix legacy module interop not handling hitTest correctly Pull Request resolved: https://github.com/facebook/react-native/pull/54802 Reviewed By: cortinico Differential Revision: D88630976 Pulled By: cipolleschi fbshipit-source-id: 85ce2b4e4244b05c19942208fdfb6a65d91e2f38
This commit is contained in:
committed by
meta-codesync[bot]
parent
dd1f83e616
commit
700d320a5f
+11
@@ -287,4 +287,15 @@ static NSString *const kRCTLegacyInteropChildIndexKey = @"index";
|
||||
[_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
|
||||
|
||||
Reference in New Issue
Block a user