Fix findNodeAtPoint returns incorrect view
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.
Differential Revision: D56334314
| 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: 61f584c3afb79ba705be8b6372ff9b6c5599680e Branch: main
It was synced in this commit https://github.com/facebook/react-native/commit/a9a7382d95a9e44cd97ff47464262df5af2ab358