Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable searching through a view's parents for a React tag to call blur/focus on #2325

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

amgleitman
Copy link
Member

@amgleitman amgleitman commented Jan 3, 2025

Summary:

This is a follow-up to #2323. I found that the first responder may not necessarily have a React tag (e.g., a <TextInput>, as explained in the code's comments). To fix this, we just crawl up the view hierarchy to find the first ancestor that has a React tag and dispatch the relevant event there.

Test Plan:

The test app made for #2323 has been updated to include a <TextInput>, and I validated that blur and focus events still come through as before.

The base for the test app can be found here, although you'll have to add the changes to RCTRootView.m manually.

@amgleitman amgleitman requested a review from a team as a code owner January 3, 2025 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant