You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Overwrite betterHitTest in RCTScrollViewComponentView instead of changing layout metrics of the container view (facebook#50027)
Summary:
Pull Request resolved: facebook#50027
Changelog: [IOS][CHANGED] - Overwrite betterHitTest in RCTScrollViewComponentView instead of changing layout metrics of the container view
## Summary:
In facebook#49855 I changed the container view of `RCTScrollViewComponentView` to be `RCTViewComponentView` instead of `UIView` so the touches would bass through its `betterHitTest` implementation (along with udating its layout metrics so the right path in the function is chosen). This resulted in some issues and the alternative approach of customizing the hit testing of the ScrollView itself might be a better approach.
This PR changes overwrites the `betterHitTest` method in a way that the `containerView` is entirely skipped during hit testing, instead forwarding the call to its children. This way, it won't prevent touches outside its frame from being delivered to children that extend out of the frame.
Reviewed By: cipolleschi
Differential Revision: D71187882
fbshipit-source-id: 9d0c79048f389b9bee37dea1e59226b54ddbe6f2
0 commit comments