Skip to content

fix(android-edge-to-edge-support): fix bottom margin double-counting when keyboard is visible#829

Merged
robingenz merged 2 commits intomainfrom
fix/edge-to-edge-keyboard-insets
Apr 13, 2026
Merged

fix(android-edge-to-edge-support): fix bottom margin double-counting when keyboard is visible#829
robingenz merged 2 commits intomainfrom
fix/edge-to-edge-keyboard-insets

Conversation

@robingenz
Copy link
Copy Markdown
Member

@robingenz robingenz commented Apr 13, 2026

Summary

  • Refactored duplicated inset logic into a shared applyInsetsInternal method
  • Fixed bottom margin double-counting when the keyboard is visible by setting bottom margin to 0 when the keyboard is shown (the system already resizes the window)
  • Added @capacitor/keyboard plugin to the example app with resizeOnFullScreen: false

Close #812

Copilot AI review requested due to automatic review settings April 13, 2026 09:09
@robingenz robingenz self-assigned this Apr 13, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Android edge-to-edge support plugin to avoid applying a bottom margin when the on-screen keyboard (IME) is visible (preventing double-counting), and updates the example app to include the Capacitor Keyboard plugin configuration needed to reproduce/validate the behavior.

Changes:

  • Refactors inset handling into a shared applyInsetsInternal(...) helper in EdgeToEdge.java.
  • Changes bottom margin application logic when the IME is visible to avoid double-counting.
  • Adds @capacitor/keyboard to the example app and wires the Android + Capacitor config for it.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/android-edge-to-edge-support/android/src/main/java/io/capawesome/capacitorjs/plugins/androidedgetoedgesupport/EdgeToEdge.java Refactors inset application and adjusts bottom margin behavior during IME visibility.
packages/android-edge-to-edge-support/example/package.json Adds @capacitor/keyboard dependency.
packages/android-edge-to-edge-support/example/package-lock.json Locks @capacitor/keyboard and updates resolved dependency tree.
packages/android-edge-to-edge-support/example/capacitor.config.json Configures Keyboard plugin (resizeOnFullScreen: false).
packages/android-edge-to-edge-support/example/android/capacitor.settings.gradle Includes the Android module for @capacitor/keyboard.
packages/android-edge-to-edge-support/example/android/app/capacitor.build.gradle Adds Gradle dependency for capacitor-keyboard.
.changeset/sad-keys-play.md Adds a patch changeset describing the fix.
Files not reviewed (1)
  • packages/android-edge-to-edge-support/example/package-lock.json: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@robingenz robingenz merged commit 78d8bfd into main Apr 13, 2026
5 checks passed
@robingenz robingenz deleted the fix/edge-to-edge-keyboard-insets branch April 13, 2026 09:17
@github-actions github-actions bot mentioned this pull request Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: edge-to-edge is duplicating the keyboard area and shrinking the webview too much on Android 16

2 participants