fix(ios): fix broken transitions with autoFocus=true by moving to viewDidAppear#56620
Open
hannojg wants to merge 10 commits intofacebook:mainfrom
Open
fix(ios): fix broken transitions with autoFocus=true by moving to viewDidAppear#56620hannojg wants to merge 10 commits intofacebook:mainfrom
hannojg wants to merge 10 commits intofacebook:mainfrom
Conversation
|
Warning JavaScript API change detected This PR commits an update to
This change was flagged as: |
6ff06cf to
e84548f
Compare
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:
Fixes:
autoFocuscalled indidMoveToWindowcausing transition glitches with UIKit #56595Caution
This is based on the following PRs which should be merged first:
When feature flag
enableIOSExperimentalAutoFocusImplementationis enabled on iOS we will not request focus to the input (callingbecomeFirstResponder) indidMoveToWindowbut inviewDidAppearof the parent's view controller.This will make the keyboard appear after any UIKit transitions are done, however, it will fix any glitches with the transition.
This is especially relevant for third party navigation libraries, such as react-native-screens:
Changelog:
[IOS] [FIXED] - Fixed #56595 app lags/stutters while navigating to a new screen with auto focused text input
Test Plan:
Try switching the
autoFocusprop in the RN tester app. See those recordingsWith the feature flag enabled
w_featureflag_compressed.mp4
Without feature flag
wo_featureflag_compressed.mp4