Skip to content

Add nullptr checks for findNextFocusableView#49996

Closed
jorge-cab wants to merge 1 commit into
react:mainfrom
jorge-cab:export-D71050870
Closed

Add nullptr checks for findNextFocusableView#49996
jorge-cab wants to merge 1 commit into
react:mainfrom
jorge-cab:export-D71050870

Conversation

@jorge-cab

Copy link
Copy Markdown
Contributor

Summary:
We were missing some null checks that could cause a crash.

There seems to be some cases where either the parent or the currently focused View are present on Android's hierarchy but not present on the Shadow Tree, in this cases we can just return a nullptr to fall back to default focusing behavior on Android.

Reviewed By: joevilches

Differential Revision: D71050870

Summary:
We were missing some null checks that could cause a crash.

There seems to be some cases where either the parent or the currently focused View are present on Android's hierarchy but not present on the Shadow Tree, in this cases we can just return a nullptr to fall back to default focusing behavior on Android.

Reviewed By: joevilches

Differential Revision: D71050870
@facebook-github-bot facebook-github-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 Mar 12, 2025
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D71050870

@react-native-bot

Copy link
Copy Markdown
Collaborator

This PR is stale because it has been open for 180 days with no activity. It will be closed in 7 days unless you comment on it or remove the "Stale" label.

@react-native-bot react-native-bot added Stale There has been a lack of activity on this issue and it may be closed soon. and removed Stale There has been a lack of activity on this issue and it may be closed soon. labels Sep 9, 2025
@react-native-bot

Copy link
Copy Markdown
Collaborator

This PR is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@react-native-bot react-native-bot added Stale There has been a lack of activity on this issue and it may be closed soon. and removed Stale There has been a lack of activity on this issue and it may be closed soon. labels Mar 8, 2026
@react-native-bot

Copy link
Copy Markdown
Collaborator

Closing as this has been merged in 7583897

@react-native-bot react-native-bot added the Merged This PR has been merged. label Jun 3, 2026
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. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants