Skip to content

chore(fabric): implement focus view props - #2692

Merged
Saad Najmi (Saadnajmi) merged 4 commits into
microsoft:mainfrom
Saadnajmi:focus-impl
Sep 19, 2025
Merged

chore(fabric): implement focus view props#2692
Saad Najmi (Saadnajmi) merged 4 commits into
microsoft:mainfrom
Saadnajmi:focus-impl

Conversation

@Saadnajmi

@SaadnajmiSaad Najmi (Saadnajmi) commented Sep 17, 2025

Copy link
Copy Markdown
Collaborator

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
Saad Najmi (Saadnajmi) marked this pull request as ready for review September 19, 2025 18:37
@Saadnajmi
Saad Najmi (Saadnajmi) merged commit 0438580 into microsoft:mainSep 19, 2025
21 checks passed
Saad Najmi (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
react@3e58380
## Test Plan:
`ref.current?.focus()` actually works.
Sign up for freeto 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

@Saadnajmi@acoates-ms