Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix findNodeAtPoint returns incorrect view #44327

Closed
wants to merge 1 commit into from

Conversation

realsoelynn
Copy link
Contributor

Summary:

Changelog: [Internal]
Expectation: In React DevTools, user should be able to select an element on screen and it will show you what React component rendered it. This doesn't work in RN app that is using JS navigation

Root Cause:
In Fabric, when we try to find ShadowNode in the ShadowTree, pointerEvents props are not considered during the lookup of node using coordinate. Hence, in React DevTools when we inspect element, it was hightlighting the overlay View with pointerEvents props box-none was getting highlighted instead of its children view in the hierarchy.

Differential Revision: D56334314

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner labels Apr 30, 2024
@analysis-bot
Copy link

analysis-bot commented Apr 30, 2024

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 19,478,546 +32,793
android hermes armeabi-v7a n/a --
android hermes x86 n/a --
android hermes x86_64 n/a --
android jsc arm64-v8a 22,851,087 +32,787
android jsc armeabi-v7a n/a --
android jsc x86 n/a --
android jsc x86_64 n/a --

Base commit: 61f584c
Branch: main

Summary:
- This fix majority work is based off of hoxyq https://www.internalfb.com/diff/D56185630

Changelog: [Internal]
`Expectation`: In React DevTools, user should be able to select an element on screen and it will show you what React component rendered it. This doesn't work in RN app that is using JS navigation

`Root Cause`:
In Fabric, when we try to find `ShadowNode` in the `ShadowTree`, `pointerEvents` props are not considered during the lookup of node using coordinate. Hence, in React DevTools when we inspect element, it was hightlighting the overlay `View` with `pointerEvents` props `box-none` was getting highlighted instead of its children view in the hierarchy.

Reviewed By: javache

Differential Revision: D56334314
@realsoelynn realsoelynn deleted the export-D56334314 branch May 29, 2024 00:00
@realsoelynn
Copy link
Contributor Author

realsoelynn commented May 29, 2024

It was synced in this commit a9a7382

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. p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants