Skip to content

Conversation

@Saadnajmi
Copy link
Collaborator

@Saadnajmi Saadnajmi commented Sep 17, 2025

Needs #2690 to land first.

Summary:

Implement focus on RCTViewComponentView. Much of the implementation is taken from #1437, #2117 and comparing against RCTView. The border path used for drawFocusRingMask is the same as what is used for box shadows and cursors.

Test Plan:

The focus loop seems nonexistent on both paper and Fabric in RNTester... but I can verify that calling ref.current?/.focus() on a Pressable displays the focus ring

@Saadnajmi Saadnajmi marked this pull request as ready for review September 19, 2025 18:37
@Saadnajmi Saadnajmi requested a review from a team as a code owner September 19, 2025 18:37
@Saadnajmi Saadnajmi enabled auto-merge (squash) September 19, 2025 19:17
@Saadnajmi Saadnajmi merged commit 0438580 into microsoft:main Sep 19, 2025
21 checks passed
Saadnajmi added a commit that referenced this pull request Sep 23, 2025
## Summary:

Followup to #2692 , we need to add `focus` and `blur` to the View native
components' commands, and implement them so they can be called by JS.
This matches what is later implemented upstream in
facebook@3e58380

## Test Plan:

`ref.current?.focus()` actually works.
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.

2 participants