forked from facebook/react-native
-
Notifications
You must be signed in to change notification settings - Fork 138
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
fix(fabric, text input): use window to focus and blur TextInput #2284
Merged
Conversation
This file contains 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
Saadnajmi
force-pushed
the
fabric/text-input
branch
3 times, most recently
from
November 19, 2024 22:09
1b0cfcf
to
081ac2a
Compare
Saadnajmi
changed the title
fix(fabric): Cherrry-pick fixes to TextInput
fix(fabric): Cherry-pick fixes to TextInput
Nov 19, 2024
Saadnajmi
changed the title
fix(fabric): Cherry-pick fixes to TextInput
fix(fabric): Cherry-pick fixes to render Text in an Nov 20, 2024
NSTextView
Saadnajmi
changed the title
fix(fabric): Cherry-pick fixes to render Text in an
[DRAFT][WIP] fix(fabric): Cherry-pick fixes
Nov 20, 2024
NSTextView
Summary: 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
Saadnajmi
force-pushed
the
fabric/text-input
branch
from
November 20, 2024 00:44
081ac2a
to
ba8744a
Compare
Saadnajmi
changed the title
[DRAFT][WIP] fix(fabric): Cherry-pick fixes
fix(fabric, text input): use window to focus and blur TextInput
Nov 20, 2024
FalseLobster
approved these changes
Nov 20, 2024
tido64
approved these changes
Nov 20, 2024
...ges/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm
Outdated
Show resolved
Hide resolved
...ges/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm
Outdated
Show resolved
Hide resolved
…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
Saadnajmi
force-pushed
the
fabric/text-input
branch
from
November 20, 2024 17:17
ba8744a
to
2b7bbcf
Compare
lenaic
reviewed
Nov 20, 2024
...ges/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm
Outdated
Show resolved
Hide resolved
Saadnajmi
force-pushed
the
fabric/text-input
branch
from
November 20, 2024 18:07
2b7bbcf
to
78467d2
Compare
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:
Cherry pick a couple of changes to have TextInput call focus and blur (natively,
makeFirstResponder
andresignFirstResponder
) through its window instance variable rather than through its' self.Test Plan:
RNTester runs fine while focusing and blurring some text inputs.