-
-
Notifications
You must be signed in to change notification settings - Fork 100
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
Issues with behavior set to padding on Android devices #850
Comments
@wongk may I ask you to attach a video how this process looks in reality? From a single screenshot it's hard to tell what is going wrong 😅 And is it possible to prepare a minimal reproduction example? Basically it's very strange, that padding gets added two times 🤔 |
Screen.Recording.2025-03-11.at.1.56.53.PM.mov |
@kirillzyusko in the video you can see a couple of issues. When the keyboard is opened at first on the empty state, everything looks good. When the keyboard is opened on an active chat, there is extra padding between the keyboard and the content. And then when clicking the "New Chat" button, the reported issue reproduces. This is all working as expected on iOS. I added the red border around the chat area for debugging. This is on the I'd love to help out with a reproducible example, but at the moment I am trying to get through release blockers to get a release out the door. |
@wongk which |
|
OK, I used a layout event handler and confirmed that the parent view of the |
@kirillzyusko out of curiosity, how does react-native-keyboard-controller stop the app window from being resized when the KB opens? I am still able to reliably get the app into such a state where the app window will resize when the KB opens. It only does this after following very specific steps, though. is it possible that whatever mechanism is used to prevent this resizing could be interfered with somehow? |
Wow. After 2 full days of debugging, I tracked down the root cause of this issue. The use of |
Ah, glad you figured it out! I wrote about it here but glad you managed to find a root cause! |
Basically it's default Android behavior if you are using edge-to-edge and |
Describe the bug
It is possible to get double padding inserted into the view on Android devices, when the behavior is set to padding.
Code snippet
Repo for reproducing
To Reproduce
In our app, with the virtual keyboard open, a button is pressed that causes a re-render of the parent component containing the keyboard avoiding view. The content within the keyboard avoiding view is also updated. In this case, the padding is inserted a second time, which shoves all the the content within the keyboard avoiding view to the top of the screen.
Expected behavior
The padding should not be inserted a second time.
Screenshots

Smartphone (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: