Skip to content

[Bug]: Android WebView does not fill screen height and scroll is blocked when using server.url #8431

@marcomanerabrescia-create

Description

Capacitor Version

Describe the bug

Capacitor app loads remote URL via server.url. On Android WebView the content does not fill the full screen height.

  • Small phones: content taller than screen but page does NOT scroll. Bottom buttons cut off.
  • Large phones: content shorter than screen, white space at bottom.

Works correctly in Chrome browser on same device.

To Reproduce

Use server.url in capacitor.config.json pointing to a remote HTML page.

Expected behavior

WebView fills full screen height and scrolls vertically when content is taller than screen.

capacitor.config.json

{
"server": { "url": "https://consul

Other API Details

Platforms Affected

  • iOS
  • Android
  • Web

Current Behavior

Capacitor app loads remote URL via server.url. On Android WebView the content does not fill the full screen height.

  • Small phones: content taller than screen but page does NOT scroll. Bottom buttons are cut off and unreachable.
  • Large phones: content shorter than screen, white space at bottom.

Works correctly in Chrome browser on same device.

capacitor.config.json:
{
"server": { "url": "https://consulenti.puschpromozioni.it", "cleartext": true },
"plugins": { "SystemBars": { "insetsHandling": "auto" } }
}

Already tried without success:

  • setUseWideViewPort(true/false)
  • setLoadWithOverviewMode(true/false)
  • min-height: 100vh / 100dvh / fit-content
  • overflow-y: scroll on body
  • WindowCompat.setDecorFitsSystemWindows(getWindow(), false)

Expected Behavior

WebView fills the full screen height on all Android devices and scrolls vertically when content is taller than the screen. No white space at the bottom.

Project Reproduction

No public repository available. The app is a Capacitor 8 wrapper loading this remote URL: https://consulenti.puschpromozioni.it/agenda-cliente-001-v2.html

Additional Information

Already tried without success:

  • setUseWideViewPort(true/false)
  • setLoadWithOverviewMode(true/false)
  • min-height: 100vh / 100dvh / fit-content on container
  • overflow-y: scroll on body
  • WindowCompat.setDecorFitsSystemWindows(getWindow(), false)
  • insetsHandling: auto / disable in capacitor.config.json

The app works correctly in Chrome browser on the same device.

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