-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
UI problem with iOS floating keyboard in iPad. #44068
Comments
|
|
Please look in the react-native:0.73.2 because we recently upgraded my project to 0.73.2 |
@netmaxt3r - Thanks for your reply. We have 20 - 30 screens in my project. We need to add the condition to KeyboardAvoidingView for every screen any other solution, please? |
Please check the sample repo for this issue. RPReplay_Final1713673899.MP4 |
Hi, |
Any update on this issue? |
Please update on this. I provided a repo also. |
Any update? |
Nope there are no updates. We do have hundreds of bugs and we can't look at all of them. We're currently prioritising New Architecture bugs. Please refrain from commenting "Any updates?" on an issue as that just creates unnecessary noise. |
Opened a PR fixing this in #44859 |
Is this issue fixed? |
@facebook-github-bot - How can this be fixed in react-native:0.73.7? |
You'll have to ask for a pick request down to 0.73 here: |
Summary: On iPadOS, users can change the kind of keyboard displayed onscreen, going from normal keyboard, to split keyboard (one half on the left of the screen, one half on the right), or a floating keyboard that you can move around the screen. When a non-normal kind of keyboard is used, `<KeyboardAvoidingView>` calculations are all wrong and, depending on the `behavior` prop, can make your screen completely hidden. This PR attempts to detect that the keyboard is not the "normal displayed-at-bottom-of-screen" keyboard, and forces `enable={false}` if this happens. The approach of comparing the keyboard width with the window width comes from this comment: #29473 (comment) A better fix might be to detect the kind of keyboard used, but this involves native code changes and I do not know iOS enough to do that. In addition, I have not found an easy way to do it using iOS APIs after a quick search. I also chose to cache the window width as a class attribute. Maybe this is not needed as `Dimensions.get('window').width` is very fast and can be called on every keyboard event? This fixes #44068 and #29473 ## Changelog: [IOS] [FIXED] - Fix `<KeyboardAvoidingView>` with floating keyboard on iPadOS Pull Request resolved: #44859 Test Plan: Tested using RNTester and the "Keyboard Avoiding View with different behaviors" example. Before: https://github.com/facebook/react-native/assets/42070/111598a3-286c-464d-8db8-73afb35cd7f9 After: https://github.com/facebook/react-native/assets/42070/0b3bc94f-8b67-4f42-8a83-e11555080268 Reviewed By: cortinico Differential Revision: D62844854 Pulled By: cipolleschi fbshipit-source-id: 577444be50019572955a013969d78178914b5b8d
Summary: On iPadOS, users can change the kind of keyboard displayed onscreen, going from normal keyboard, to split keyboard (one half on the left of the screen, one half on the right), or a floating keyboard that you can move around the screen. When a non-normal kind of keyboard is used, `<KeyboardAvoidingView>` calculations are all wrong and, depending on the `behavior` prop, can make your screen completely hidden. This PR attempts to detect that the keyboard is not the "normal displayed-at-bottom-of-screen" keyboard, and forces `enable={false}` if this happens. The approach of comparing the keyboard width with the window width comes from this comment: #29473 (comment) A better fix might be to detect the kind of keyboard used, but this involves native code changes and I do not know iOS enough to do that. In addition, I have not found an easy way to do it using iOS APIs after a quick search. I also chose to cache the window width as a class attribute. Maybe this is not needed as `Dimensions.get('window').width` is very fast and can be called on every keyboard event? This fixes #44068 and #29473 [IOS] [FIXED] - Fix `<KeyboardAvoidingView>` with floating keyboard on iPadOS Pull Request resolved: #44859 Test Plan: Tested using RNTester and the "Keyboard Avoiding View with different behaviors" example. Before: https://github.com/facebook/react-native/assets/42070/111598a3-286c-464d-8db8-73afb35cd7f9 After: https://github.com/facebook/react-native/assets/42070/0b3bc94f-8b67-4f42-8a83-e11555080268 Reviewed By: cortinico Differential Revision: D62844854 Pulled By: cipolleschi fbshipit-source-id: 577444be50019572955a013969d78178914b5b8d
Description
Issue with TextInput return type "Done" on iPad using Floating keyboard
Steps to reproduce
React Native Version
0.73.2
Affected Platforms
Runtime - iOS
Output of
npx react-native info
Stacktrace or Logs
Reproducer
No Git url
Screenshots and Videos
RPReplay_Final1712984638.MP4
The text was updated successfully, but these errors were encountered: