Skip to content

Commit

Permalink
Fix forwarding touches to components in the Interop Layer
Browse files Browse the repository at this point in the history
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
  • Loading branch information
cipolleschi authored and facebook-github-bot committed Feb 15, 2024
1 parent 53e3f36 commit ab5e2e8
Showing 1 changed file with 0 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,6 @@ - (instancetype)initWithFrame:(CGRect)frame
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) {
Expand Down

0 comments on commit ab5e2e8

Please sign in to comment.