You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Android Keyboard reserves too much space on rapid re-focus after background-tap dismiss (keyboards with suggestion strip), causing double layout jump #8575
When the keyboard is dismissed by tapping the background (input blur) and the same (or another) input is re-focused quickly (within ~1 second), the keyboard initially reserves more vertical space than it actually needs. A few milliseconds later the reserved space corrects itself to the true keyboard height, producing a visible double jump of the webview/layout.
The issue is timing-dependent and only reproducible with a specific dismiss method:
✅ Happens: dismiss via background tap (input blur) → quickly re-focus input
❌ Never happens: dismiss via native back button → re-focus input (any speed)
❌ Never happens: background tap dismiss → wait 1–2 seconds → re-focus input
The issue also appears to depend on the keyboard app — specifically on whether it renders a suggestion strip above the keys:
✅ Reproducible on Gboard (has suggestion strip)
✅ Reproducible on SwiftKey (has suggestion strip)
❌ Not reproducible on a keyboard without a suggestion strip — rapid re-focus resizes correctly out of the box
Expected Behavior
Re-focusing an input immediately after a blur-based dismiss should resize the layout once, to the correct keyboard height — identical to the behavior after a native-back dismiss or after waiting between taps.
Create a page with a text input and enough empty background area to tap.
Tap the input → keyboard (e.g. Gboard or SwiftKey) opens normally.
Tap the background to blur the input → keyboard closes normally. ✅
Immediately (within ~1s) tap the input again.
Observe: the layout jumps up more than needed, then a few milliseconds later snaps back down to the correct keyboard height → visible double jump.
To confirm the timing dependency, repeat steps 3–4 but wait 1–2 seconds before re-focusing: the keyboard opens with a single, correct resize every time.
To confirm the dismiss-method dependency, dismiss with the native back button instead of a background tap: rapid re-focus works correctly every time.
To confirm the keyboard dependency, switch to a keyboard app without a suggestion strip and repeat the rapid re-focus sequence: the layout resizes correctly in a single step every time.
Note: This issue seems to still happen in Capacitor 8.5.2, from my tests on the provided reproduction app after updating to 8.5.2, and with insetsHandling: 'native'. Tested on an Android 17 device.
Activity
OS-pedrogustavobilro commentedon Sep 11, 2026
Note: This issue seems to still happen in Capacitor 8.5.2, from my tests on the provided reproduction app after updating to 8.5.2, and with
insetsHandling: 'native'. Tested on an Android 17 device.