gabriel2mm opened a new pull request, #1924: URL: https://github.com/apache/cordova-android/pull/1924
<!-- Please make sure the checklist boxes are all checked before submitting the PR. The checklist is intended as a quick reference, for complete details please see our Contributor Guidelines: http://cordova.apache.org/contribute/contribute_guidelines.html Thanks! --> ### Platforms affected - Android ### Motivation and Context This change is required to fix UI layout and scrolling bug present in `cordova-android`@15.0.0. When an input field receives focus on a scrollable screen, the Android soft keyboard pushes the entire WebView upward. This leaves an empty, unrendered space at the bottom of the Activity and completely locks the page scroll, which breaks applications relying on viewport heights or scroll adjustments. Closes https://github.com/apache/cordova-android/issues/1923 ### Description This PR adjusts how the native root layout handles window insets when the soft keyboard (IME) is displayed. Previously, the layout did not account for the IME insets natively, causing Android to shift the entire Activity upward and cut off the `<body>` boundaries. By adding `WindowInsetsCompat.Type.ime()` to the `ViewCompat.setOnApplyWindowInsetsListener` configuration, the root layout now listens to the keyboard dimensions alongside system bars and display cutouts. This correctly applies the bottom margin dynamically to the `webViewParams`. after adding: <img width="1504" height="848" alt="Captura de Tela 2026-05-14 às 16 16 07" src="https://github.com/user-attachments/assets/78e6aa37-5a12-4ce4-9747-115a73f189e2" /> This behavior is very similar to how cordova-android@14 behaves. ### Testing - npm t - Build testing ### Checklist - [x] I've run the tests to see all new and existing tests pass - [ ] I added automated test coverage as appropriate for this change - [ ] Commit is prefixed with `(platform)` if this change only applies to one platform (e.g. `(android)`) - [x] If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct [keyword to close issues using keywords](https://help.github.com/articles/closing-issues-using-keywords/)) - [ ] I've updated the documentation if necessary -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
