mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix forwarding touches to components in the Interop Layer
Summary: When analyzing the `hitTest:withEvent` function, I realized that we were not forwarding the touches to the legacy view. The previous algorithm was returning the InteropLegacyWrapper view itself when the touches were happening in the legacy view, preventing the handlers attached to the legacy view to fire. With this change, if the legacy view receives a touch, it can handle it. ## Changelog [iOS][Fixed] - Make sure to forward touches to the wrapped component in the InteropLayer. Reviewed By: sammy-SC Differential Revision: D53806218 fbshipit-source-id: 87b0aa6e900935092e6f5e1533b871c1d224b718
This commit is contained in:
committed by
Facebook GitHub Bot
parent
53e3f364cf
commit
ab5e2e8099
-11
@@ -41,17 +41,6 @@ static NSString *const kRCTLegacyInteropChildIndexKey = @"index";
|
||||
return self;
|
||||
}
|
||||
|
||||
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event
|
||||
{
|
||||
UIView *result = [super hitTest:point withEvent:event];
|
||||
|
||||
if (result == _adapter.paperView) {
|
||||
return self;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
- (RCTLegacyViewManagerInteropCoordinator *)_coordinator
|
||||
{
|
||||
if (_state != nullptr) {
|
||||
|
||||
Reference in New Issue
Block a user