Skip to content
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

[iOS] Fix ScrollView automaticallyAdjustKeyboardInsets not resetting when Prefer Cross-Fade Transitions is enabled #35933

Conversation

grgmo
Copy link
Contributor

@grgmo grgmo commented Jan 23, 2023

Summary

Similar to the issue here #34503 but this is also happening if we just use ScrollView and TextInput with automaticallyAdjustKeyboardInsets enabled.

When we enable Prefer Cross-Fade Transitions in iOS we get a keyboard height of 0 which causes the inset/offset miscalculation and the content jumps up when the keyboard gets hidden.

Changelog

[IOS] [FIXED] - Fix ScrollView automaticallyAdjustKeyboardInsets not resetting when Prefer Cross-Fade Transitions is enabled and keyboard hides

Test Plan

Tested with brand new react native project with/without the fix

before fix automaticallyAdjustKeyboardInsets with enabled/disabled opening/closing keyboard

before-new-app.mov

after fix automaticallyAdjustKeyboardInsets with enabled/disabled opening/closing keyboard

after-new-app.mov

…when Prefer Cross-Fade Transitions is enabled when using with TextInput
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 23, 2023
@facebook-github-bot
Copy link
Contributor

@jacdebug has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Jan 24, 2023
@facebook-github-bot
Copy link
Contributor

@jacdebug merged this pull request in b8f1bb5.

OlimpiaZurek pushed a commit to OlimpiaZurek/react-native that referenced this pull request May 22, 2023
…refer Cross-Fade Transitions is enabled (facebook#35933)

Summary:
Similar to the issue here facebook#34503 but this is also happening if we just use `ScrollView` and `TextInput` with `automaticallyAdjustKeyboardInsets` enabled.

When we enable `Prefer Cross-Fade Transitions` in `iOS` we get a keyboard height of `0` which causes the inset/offset miscalculation and the content jumps up when the keyboard gets hidden.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[IOS] [FIXED] - Fix ScrollView `automaticallyAdjustKeyboardInsets` not resetting when Prefer Cross-Fade Transitions is enabled and keyboard hides

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[IOS] [FIXED] - Fix ScrollView `automaticallyAdjustKeyboardInsets` not resetting when Prefer Cross-Fade Transitions is enabled and keyboard hides

Pull Request resolved: facebook#35933

Test Plan:
Tested with brand new react native project with/without the fix

before fix `automaticallyAdjustKeyboardInsets` with enabled/disabled opening/closing keyboard

https://user-images.githubusercontent.com/6507800/214039873-33bfb016-f99f-4644-9174-20bf32cf07d6.mov

after fix `automaticallyAdjustKeyboardInsets` with enabled/disabled opening/closing keyboard

https://user-images.githubusercontent.com/6507800/214039887-4054a749-ab15-4399-b6a9-73dc9283aa6b.mov

Reviewed By: christophpurrer

Differential Revision: D42686390

Pulled By: jacdebug

fbshipit-source-id: 98488e0c9639c19a4acae1a1de1a5fde411e2462
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants