Uh oh!
There was an error while loading. Please reload this page.
fix(fabric, text input): use window to focus and blur TextInput - #2284
Merged
Saad Najmi (Saadnajmi) merged 3 commits intoNov 20, 2024
Conversation
Saad Najmi (Saadnajmi)force-pushed
the
fabric/text-input
branch
3 times, most recently
from
November 19, 2024 22:09
1b0cfcf to
081ac2aCompareNSTextViewNSTextViewSummary: Fix AppKit exception throws when focusing text inputs by calling becomeFirstResponder directly on the backing text input view. Making a view first responder has to happen through the window using makeFirstResponder. Test Plan: - Run Zeratul with Fabric - Focus the search text input above the message threads - Click inside the active message thread to trigger the auto-focus of the composer - The composer gets focus without AppKit throwing an exception. https://pxl.cl/3dVMx Reviewers: shawndempsey, #rn-desktop Reviewed By: shawndempsey Differential Revision: https://phabricator.intern.facebook.com/D48696690
Saad Najmi (Saadnajmi)force-pushed
the
fabric/text-input
branch
from
November 20, 2024 00:44
081ac2a to
ba8744aCompareSaad Najmi (Saadnajmi)
marked this pull request as ready for review
November 20, 2024 00:47
Saad Najmi (Saadnajmi)
requested a review
from Alicia Drummond (FalseLobster)November 20, 2024 00:47
Alicia Drummond (FalseLobster)
approved these changes
Nov 20, 2024
Tommy Nguyen (tido64)
approved these changes
Nov 20, 2024
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…stance Summary: Fix AppKit exception throws when blurring text inputs by calling `resignFirstResponder` directly on the backing text input view. Resigning the first responder state has to happen through the window by calling `[window makeFirstResponder:nil]` which will: - call `resignFirstResponder` on the current first responder - if successful, the window will become the first responder Test Plan: - Run Zeratul with Fabric - Focus the search text input above the message threads - Click inside the active message thread to trigger the auto-focus of the composer and the blur on the search field - The focused field resigns the first responder status without throwing an exception https://pxl.cl/3GvZD Reviewers: shawndempsey, #rn-desktop Reviewed By: shawndempsey Differential Revision: https://phabricator.intern.facebook.com/D50700782
Saad Najmi (Saadnajmi)force-pushed
the
fabric/text-input
branch
from
November 20, 2024 17:17
ba8744a to
2b7bbcfCompareUh oh!
There was an error while loading. Please reload this page.
Saad Najmi (Saadnajmi)force-pushed
the
fabric/text-input
branch
from
November 20, 2024 18:07
2b7bbcf to
78467d2Compare
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 freeto 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:
Cherry pick a couple of changes to have TextInput call focus and blur (natively,
makeFirstResponderandresignFirstResponder) through its window instance variable rather than through its' self.Test Plan:
RNTester runs fine while focusing and blurring some text inputs.