Skip to content

fix(android): use interactive-widget=resizes-content for keyboard resize - #2344

Merged
tomivm merged 1 commit into
masterfrom
fix/android-keyboard-visual-viewport
Sep 14, 2026
Merged

tomivm merged 1 commit into
masterfrom
fix/android-keyboard-visual-viewport

Conversation

@tomivm

@tomivm tomivm commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds interactive-widget=resizes-content to the viewport meta tag so the layout viewport shrinks when the Android soft keyboard opens — fixing dialogs (e.g. login) sitting behind the keyboard, without a native plugin.

Why not the existing plugin?

cordova-plugin-ionic-keyboard's resizeOnFullScreen preference used to do this, but it's been false (the plugin's own default) since d97f016 in 2023 — a fix for live-mode board resize that silently disabled the keyboard workaround. The plugin is unmaintained (last npm publish 2019) and is being removed from cboard-org/ccboard (see cboard-org/ccboard#68, #83) because of an unrelated iOS layout bug on notched devices. This PR replaces its one useful Android behavior with a standards-based equivalent (Chrome 108+, i.e. Android WebView).

Companion change

cboard-org/ccboard#(plugin removal PR) removes the plugin from the Cordova shell. This PR should be verified on an Android device before that one merges.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WdYCb68usnzVF12qvyB2vP

The Android build relied on cordova-plugin-ionic-keyboard (via the
resizeOnFullScreen preference) to resize the layout when the software
keyboard opens, so fixed-position dialogs (e.g. the login dialog)
don't end up hidden behind it.

That preference has been set to false since d97f016 (2023, to fix
live-mode board resize), which is also the plugin's built-in default,
so the workaround has been inert for two years. The plugin is also
unmaintained (last publish 2019) and is being removed from the ccboard
project (cboard-org/ccboard#83, #68) because of an unrelated iOS
layout bug on notched devices.

Add interactive-widget=resizes-content to the viewport meta tag
instead. Supported by Chrome 108+ (the Android WebView engine), it
shrinks the layout viewport when the keyboard appears, which is what
MUI v4's Dialog (position: fixed, sized against the layout viewport)
needs to stay fully visible above the keyboard - without any native
plugin.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WdYCb68usnzVF12qvyB2vP
@tomivm
tomivm merged commit a2a8986 into master Sep 14, 2026
1 of 4 checks passed
@tomivm
tomivm deleted the fix/android-keyboard-visual-viewport branch September 14, 2026 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant