dillon1000/react
Commit
Browse files Handle fabric root level fragment with compareDocumentPosition (#34533)
The root instance doesn't have a canonical property so we were not returning a public instance that we can call compareDocumentPosition on when a Fragment had no other host parent in Fabric. In this case we need to get the ReactNativeElement from the ReactNativeDocument. I've also added test coverage for this case in DOM for consistency, though it was already working there because we use DOM elements as root. This same test will be copied to RN using Fantom.
Changed paths2 files
First-parent comparisonpackages/react-dom/src/__tests__/ReactDOMFragmentRefs-test.js ModifiedM packages/react-native-renderer/src/ReactFiberConfigFabric.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…