-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
The keyboard in floating mode is having problem. #29473
Comments
|
Hi @000xuandu thanks for the issue. Since this affects iPad, could you provide a repo that demonstrates this issue? |
We experienced a similar problem, when a floating keyboard was dismissed the height calculation was off so we ended up with a blank screen (because everything was pushed off the screen). When the floating keyboard is dismissed we get the following when calculating the relativeKeyboardHeight
We did a workaround to just disable the KeyboardAvoidingView when the keyboard was floating by checking if the keyboard width is the same as the screen width
Then in your component
Don't know if the appropriate solution is to disable keyboard avoiding view when the keyboard is floating (as the user can move it wherever) or how to make the component avoid the keyboard when it's moving around. |
@Gyran thanks for your workaround! You probably wanted to removeListener in the return function of useEffect I refactored it a bit, and designed it as a HOC to replace the original KeyboardAvoidingView I gonna share the code
|
@torcoste of course, updated the example with |
Yes |
Created a minimal reproducible example here: https://github.com/Gyran/RNFloatingKeyboardIssue Would an acceptable solution be to just disable the keyboard avoiding view when a user has a floating keyboard? If so, I could try to implement that in the React Native repo. |
thanks a lot it works for me! |
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
This issue was closed because it has been stalled for 7 days with no activity. |
Are there any plans to fix this in the built in |
Is this issue fixed? |
Description
My app has been rejected by apple due to interface issues.
After half a day I queried the problem, I finally realized the problem was at the
floating keyboard
of iPadOS 13.When the keyboard went into floating mode, KeyboardAvoidingView worked incorrectly and destroyed my interface structure.
React Native version:
Expected Results
What I want now to be able to recognize a certain event is to notify the keyboard to switch to floating mode, from which I will handle my UI.
Snack, code example, screenshot, or link to a repository:
Screen capture when keyboard is in anchor mode.
Screen capture when the keyboard is in floating mode.
Code:
The text was updated successfully, but these errors were encountered: