Skip to content

[Bug]: Webview doesn't resize correctly when keyboard is shown on Android #8055

@sam-higgs

Description

@sam-higgs

Capacitor Version

💊 Capacitor Doctor 💊

Latest Dependencies:

@capacitor/cli: 7.4.1
@capacitor/core: 7.4.1
@capacitor/android: 7.4.1
@capacitor/ios: 7.4.1

Installed Dependencies:

@capacitor/cli: 7.4.1
@capacitor/core: 7.4.1
@capacitor/android: 7.4.1
@capacitor/ios: 7.4.1

Other API Details

npm 10.2.3
node 20.10.0
pod 1.15.2

Platforms Affected

  • iOS
  • Android
  • Web

Current Behavior

On Android 15 and potentially other versions, when the numeric keyboard is shown, the resized web view is too small which leaves a bar between the web view and keyboard

initial height with keyboard closed: 912
keyboard height: 366
height with keyboard open: 502

Expected Behavior

height with keyboard open: 546

Project Reproduction

N/A

Additional Information

I have tried various solutions like resizeOnFullScreen: true and resize: body | native, was also curious if it was related to adjustMarginsForEdgeToEdge but this also seems to have no effect.

Update, adjustMarginsForEdgeToEdge: force doubles the gap in relation to disable

If I set await StatusBar.setOverlaysWebView({ overlay: true }); then it works first attempt then fails on future ones.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs reproductionneeds reproducible example to illustrate the issue

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions