[Bug]: Android Keyboard reserves too much space on rapid re-focus after background-tap dismiss (keyboards with suggestion strip), causing double layout jump
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- android
- 領域
- mobile-dev
調査の方向性
リンクされた再現プロジェクトから始め、Android 16 上で Gboard または SwiftKey を使用して、背景タップによる dismiss と再フォーカスの高速なシーケンスを再現します。ネイティブの戻る操作による dismiss、遅延した再フォーカス、候補表示ストリップのないキーボードと比較します。高速な再フォーカスによって、正しいサイズのレイアウト更新が 1 回だけ発生し、二重ジャンプが起きなければ修正完了です。
索引モデルが issue の本文から書いたものです。
説明
Capacitor Version
Latest Dependencies:
@capacitor/cli: 8.5.0
@capacitor/core: 8.5.0
@capacitor/android: 8.5.0
@capacitor/ios: 8.5.0
Installed Dependencies:
@capacitor/cli: 8.5.0
@capacitor/android: 8.5.0
@capacitor/core: 8.5.0
@capacitor/ios: 8.5.0
Other API Details
Platforms Affected
- iOS
- Android
- Web
Current Behavior
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.
Project Reproduction
https://github.com/kosserin/android-capacitor-keyboard-issue
Additional Information
Steps to Reproduce:
- 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.
Link of reproduction: https://jumpshare.com/share/Ous2mkGIQQdDbATIVV9g
Reproduced on Android 16, edge to edge support
- 主要言語
- TypeScript
- スター
- 17.1k
- フォーク
- 1.3k
- 平均マージ
- 1日 22時間
- マージ済み PR(30日)
- 26
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ionic-team/capacitor のほかの issue
-
triage
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
ionic-team/capacitor#8759 ·
メンテナーはふだん 1 日以内に返信
-
[Bug]: Plugin call after navigation can be answered before reply proxy is updated対応中かも @MateStrysewske が 71 日前に担当しました。 オープンtriage
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
ionic-team/capacitor#8616 ·
メンテナーはふだん 1 日以内に返信
-
help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
ionic-team/capacitor#8574 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
SystemBars: safe area CSS injection throws "Cannot read properties of null" on startup (Android 16)対応中かも @kttalley が 62 日前に担当しました。 オープンtriage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
ionic-team/capacitor#8530 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
fix(android): remove unchecked Java compilation warnings対応中かも @Ajamuar が 15 日前に担当しました。 オープンtriage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
ionic-team/capacitor#8529 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
ionic-team/capacitor の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
prio:low scope:world
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
OliverRomhagen/vrigstad-joyride#849 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
genfeedai/genfeed.ai#11916 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
erkamyaman/rust-anything#1153 ·
メンテナーはふだん 1 日以内に返信
-
The Phase 5 report says 0.3.0 waits for the live check対応中かも @fzn0x が今日担当しました。 オープンdocumentation
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信