Skip to content

[Bug]: App launches with persistent area equal to keyboard height #8289

@bcampru

Description

@bcampru

Capacitor Version

Latest Dependencies:

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

Installed Dependencies:

@capacitor/ios: not installed
@capacitor/cli: 8.0.0
@capacitor/android: 8.0.0
@capacitor/core: 8.0.0

[success] Android looking great! 👌

Other API Details

npm: 10.9.4
node: v22.21.1

Platforms Affected

  • iOS
  • Android
  • Web

Current Behavior

  • The app opens with a gray space at the bottom (roughly the keyboard height), and the content can scroll into that empty area.
  • The gap persists even after opening/closing the keyboard; only fully closing and reopening the app clears it.
  • Reproducible when launching the app from the app drawer while the keyboard is open (e.g., after typing in the app search).
  • Observed on physical devices Pixel 8 and Pixel 8a running Android 16 (SDK 36).
behavior.mp4

Expected Behavior

  • The WebView should render at full height when the keyboard is not visible.
  • No persistent gray space or extra scroll area should appear after launch.

Project Reproduction

https://github.com/bcampru/capacitor-scroll-space-bug/tree/main

Additional Information

  • Devices: Pixel 8 / Pixel 8a (physical), Android 16.
  • Device props: ro.build.version.sdk = 36, ro.product.cpu.abi = arm64-v8a.
  • Debug overlay snapshots when the issue happens show visualViewport.height reduced by ~310px while innerHeight and document/body heights remain full, and keyboardState.visible = false (suggesting stale IME insets despite no keyboard visible).
  • Things we tried without success:
    • windowSoftInputMode=adjustNothing in AndroidManifest.
    • Forcing layout recalculation in JS (visualViewport/listeners).
    • CapacitorUpdater reload / JS reload.
    • Native fix in MainActivity: hide IME, toggle SOFT_INPUT_ADJUST_NOTHINGADJUST_RESIZE, requestApplyInsets(), requestLayout(),

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions