Skip to content

fix hit test for components using legacy module interop #54802

Closed
kruczy wants to merge 1 commit intofacebook:mainfrom
kruczy:fix/legacy-view-hit-test
Closed

fix hit test for components using legacy module interop #54802
kruczy wants to merge 1 commit intofacebook:mainfrom
kruczy:fix/legacy-view-hit-test

Conversation

@kruczy
Copy link
Copy Markdown
Contributor

@kruczy kruczy commented Dec 5, 2025

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

Test Plan:

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Dec 5, 2025
@facebook-github-bot facebook-github-bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Dec 5, 2025
@kruczy kruczy force-pushed the fix/legacy-view-hit-test branch from e933057 to ebe2cb4 Compare December 5, 2025 16:30
@alanleedev
Copy link
Copy Markdown
Contributor

@kruczy Can you add how this was verified or tested?

@kruczy
Copy link
Copy Markdown
Contributor Author

kruczy commented Dec 8, 2025

hi, sure @alanleedev

We have a legacy floating panel component that we wrote very long time ago (its on its way out but still used in a few places) when we migrated to new arch we had the issue that when the FP is not fully open anything behind it would not be pressable in new arch only and its because of the hitTest missing here, with this change the behavior returned to correct one.

just to explain the code further this just does same as it would by default except ensuring the wrapper is not hit by gestures (since it will never have any gesture behavior anyway) allowing other components to take the gesture

@meta-codesync
Copy link
Copy Markdown

meta-codesync bot commented Dec 8, 2025

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this in D88630976.

Copy link
Copy Markdown
Contributor

@cortinico cortinico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review automatically exported from Phabricator review in Meta.

@meta-codesync meta-codesync bot closed this in 700d320 Dec 10, 2025
@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Dec 10, 2025
@meta-codesync
Copy link
Copy Markdown

meta-codesync bot commented Dec 10, 2025

@cipolleschi merged this pull request in 700d320.

@react-native-bot
Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @kruczy in 700d320

When will my fix make it into a release? | How to file a pick request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants