fix(0.81, macos): three Fabric focus regressions (blur, sendAccessibilityEvent, VirtualView)#3016
Merged
Saadnajmi merged 2 commits intoJul 8, 2026
Conversation
…ent, VirtualView)
Follow-up refinements on top of Thiago Vinhas's original fix: - RCTViewComponentView.blur(): only clear the window's first responder when this view actually holds it (guard on == self), matching iOS [self resignFirstResponder] semantics and avoiding stealing focus from an unrelated view. - Trim the verbose inline comments from all three changes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
tido64
approved these changes
Jul 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Backport of #3015 to
0.81-stable.Three macOS-only Fabric focus / first-responder regressions:
RCTViewComponentView.blur()— was a no-op (resignFirstResponderonNSWindowdoesn't clear the focused subview). Now clears viamakeFirstResponder:nil, guarded onself.setAccessibilityFocus— the macOS branch was empty; addedmakeFirstResponder:+NSAccessibilityFocusedUIElementChangedNotification.RCTVirtualViewComponentView— addedacceptsFirstResponder/accessibilityHitTest:hooks so keyboard/VoiceOver navigation unhides flagged-offscreen views.All changes are macOS-gated; iOS/visionOS behavior is unchanged.
Test Plan
Same as #3015 — builds clean (RNTester-macOS, BUILD SUCCEEDED); every change is inside a
#if TARGET_OS_OSX/#elsebranch.Credit
Original work by @tvinhas in #2959 (commit cherry-picked to retain authorship). Supersedes #2959.
Co-authored-by: Thiago Vinhas thiago@vinhas.net