Fix iOS crash when unmounting views near pointer hover effects - #58686
Open
lorenc-tomasz wants to merge 2 commits into
Open
lorenc-tomasz wants to merge 2 commits into
lorenc-tomasz wants to merge 2 commits into
Conversation
UIKit can insert native hover-effect views alongside Fabric children, shifting the subview indices used during mounting and unmounting. Track Fabric children separately and insert them relative to their predecessor. Use that same list when toggling clipping so UIKit-owned views are not tracked as Fabric children. Add six native regression tests and an RNTester cursor example. Update existing clipping expectations and the unmount assertion comment to match the new child tracking behavior. Changelog: [IOS] [FIXED] - Fix Fabric child mounting and unmounting around pointer hover effects. Test Plan: - 56 native tests passed, including all six regression tests; five of the six failed before the fix. The unrelated paragraph test file was excluded because of an existing ComponentBuilder linkage issue; local include-path overrides were also needed to build the test suite. - RNTester Debug simulator build succeeded. Baseline hover crash confirmed on iPad mini (A17 Pro); fixed-build touch interaction passed. Fixed-build pointer hover still needs manual verification. - Targeted clang-format, Prettier, ESLint, and git diff --check passed. Refs react#55489
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Fixes #55489.
UIKit can insert hover-effect views alongside Fabric children when using
cursor: 'pointer'. These views shift native subview indices, causing an assertion failure when unmounting a child.This change tracks Fabric children independently of UIKit’s subviews and mounts new children relative to the preceding Fabric child. Clipping uses the same list to avoid tracking UIKit-owned views.
Includes native regression tests and an RNTester example.
Changelog:
[iOS] [Fixed] - Fix a crash when unmounting views near pointer hover effects.
Test Plan:
git diff --checkpassed.