apache / apache/cordova-android

Visual glitch occurs during keyboard (IME) animations

Open
#1,946 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
3.8k
Forks
1.6k
Avg merge
16h 18m
Merged PRs (30d)
11

Description

# Bug Report

## Problem

A brief visual glitch occurs during keyboard (IME) animations where the app background becomes visible temporarily.

This appears to have been introduced in #1924, which was resolving an issue where the WebView was not fully scrollable when the IME keyboard was open.

Based on initial investigation, the behavior may be related to the WebView being resized while the IME is still animating, which can temporarily expose the underlying window background.

The issue is more noticeable when there is a strong contrast between the app's background and the web content's (for example, a light web page background over a dark application background defined via configuration preferences).

### What is expected to happen?

During the keyboard animations, the WebView should remain fully visible.

### What does actually happen?

During the keyboard animations, the app's background is briefly visible, which appears as a visual glitch.

## Information

- Create a long page with multiple input elements (so the page is scrollable).
- This step may not be necessary to reproduce the visual glitch, but it is important when addressing the issue as we need to continue to ensure the WebView remains scrollable and can reach the bottom of the page (rather than being hidden by the IME).
- Set the web page's background to a light color (e.g. white).
- Set the application background color to a dark color using `config.xml`:

```xml

```

- Build and run the application on an Android device.
- Focus on an input field to trigger opening of the keyboard.

### Environment, Platform, Device

I used the following emulator:

- Android SDK 24

### Version information

```
Cordova Packages:

cli: 13.0.0
common: 6.0.0
create: 6.0.0
lib: 13.0.0
common: 6.0.0
fetch: 5.0.0

Project Installed Platforms:

android: 15.0.1-dev.0

Project Installed Plugins:

Environment:

OS: Tahoe 26.4.1 (25E253) (darwin 25.4.0) arm64
Node: v24.13.0
npm: 11.6.2
```

> [!NOTE]
> `android: 15.0.1-dev.0` is current master branch.

The app was launched from **Android Studio Panda 4 | 2025.3.4**.

## Checklist

- [x] I searched for existing GitHub issues
- [x] I updated all Cordova tooling to most recent version
- [x] I included all the necessary information above

Contributor guide

Open the contributing guide

Research direction

Reproduce the glitch on an Android SDK 24 emulator using a long page, contrasting web and application backgrounds, and focus an input to trigger the IME. Inspect the changes from #1924 and the Android WebView resize and keyboard-animation handling. Done means the WebView remains visible during animation while still scrolling to the bottom.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, javascript
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.