Skip to content

Fix iOS crash when unmounting views near pointer hover effects - #58686

Open
lorenc-tomasz wants to merge 2 commits into
react:mainfrom
lorenc-tomasz:bugfix/ios-pointer-hover-mounting
Open

lorenc-tomasz wants to merge 2 commits into
react:mainfrom
lorenc-tomasz:bugfix/ios-pointer-hover-mounting

Conversation

@lorenc-tomasz

@lorenc-tomasz lorenc-tomasz commented Sep 25, 2026 •

Copy link
Copy Markdown

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:

  • 56 native tests passed, including six new regression tests; five of those failed before the fix. Paragraph tests were excluded due to a local build issue.
  • RNTester Debug build succeeded. Reproduced the original crash on iPad mini (A17 Pro). Touch interaction passed with the fix; pointer-hover verification passed with the fix.
  • Targeted formatting, ESLint, and git diff --check passed.

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
@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 Sep 25, 2026
@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Sep 25, 2026

This branch has not been deployed

No deployments
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. 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.

iOS RCTAssert crash when unmounting near cursor pointer hover effect

1 participant