Skip to content

WKWebView is not resized properly after the native keyboard closes #2194

Open
@drakedeatonuk

Description

@drakedeatonuk

Bug Report

Plugin(s)

@capacitor/keyboard 6.0.2

Capacitor Version

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

Platform(s)

ios & android

Current Behavior

Occasionally, when the keyboard closes, the webview doesn't resize. Instead it leaves a massive empty black space where the keyboard was. Even on subsequent opens & closes of the keyboard, the webivew then never resizes.

Expected Behavior

The webview should always resize to fill this space when the keyboard closed.

Code Reproduction

Unfortunately this issue is very hard to reproduce. I see it maybe once a week. The only pattern I've identified so far is that it seems to happen in low power mode on my iphone.

Screenshot 2024-09-18 at 06 17 14

Additional Context

I've seen this issue appear on several devices, and there seems to be at least one other ticket open on webview resizing issues (#831).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions