bug(keyboard): with `resize: none` on API < 35, `keyboardHeight` is the raw IME inset from the window bottom and overstates the part of the WebView the keyboard actually covers by the navigation-bar height
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 66/100
調査の方向性
Start with Keyboard.java at the reported lines 97, 106, 119, and 124, and trace how the IME and navigation bar insets relate to the WebView bounds on API levels below 35. Check the existing keyboard event tests and run the Android plugin tests. Done means keyboardHeight reflects the portion of the WebView covered by the keyboard across API levels, including both will-show and did-show events.
索引モデルが issue の本文から書いたものです。
説明
Plugin
Keyboard 8.0.6
Current Behavior
Keyboard.java L97 / L106 (and L119 / L124 for the did-show pair):
int imeHeight = insets.getInsets(WindowInsetsCompat.Type.ime()).bottom;
...
keyboardEventListener.onKeyboardEvent(EVENT_KB_WILL_SHOW, Math.round(imeHeight / density));
ime().bottom is measured from the bottom of the window. On API < 35 (no enforced edge-to-edge) the WebView ends above the navigation bar, so the keyboard covers imeHeight − navigationBarHeight of it, but the plugin reports imeHeight. An app that uses resize: none and moves its own composer by keyboardHeight (the documented way to animate with the keyboard) leaves a gap the size of the navigation bar (≈ 48 dp on a 3-button bar, ≈ 24 dp with gesture navigation) between the composer and the keyboard. On API 35+ the WebView reaches the window bottom and the number is right, so the same app behaves differently per OS version.
Measured on the Android 14 emulator (API 34, Pixel 6 profile, 1080×2400 @ 420 dpi, density 2.625, Gboard, 3-button navigation), windowSoftInputMode="adjustNothing", keyboard open on a field inside the WebView, read from dumpsys window and dumpsys activity top:
| px | dp | |
|---|---|---|
IME inset (type=ime frame=[0,1517][1080,2400], measured from the window bottom) — what L97/L106 report |
883 | 336 |
navigation bar (type=navigationBars frame=[0,2274][1080,2400]) |
126 | 48 |
WebView (CapacitorWebView 0,0-1080,2274, window frame=[0,0][1080,2400]) ends above the bar |
— | — |
| part of the WebView the keyboard actually covers (2274 − 1517) | 757 | 288 |
With @capacitor/keyboard 8.0.6 unmodified, the keyboardWillShow / keyboardDidShow payload on that run was {keyboardHeight: 336}. So keyboardHeight arrives as 336 while the keyboard covers 288 of the WebView's 867 CSS px; a composer moved up by keyboardHeight floats 48 dp above the keyboard. (The same WebView on an API 35 device reaches the window bottom, and 336 would be right there.)
Expected Behavior
keyboardHeight describes how much of the WebView the keyboard covers, the same on every API level.
- 主要言語
- Java
- スター
- 688
- フォーク
- 691
- 平均マージ
- 1日 15時間
- マージ済み PR(30日)
- 3
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ionic-team/capacitor-plugins のほかの issue
-
triage
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
ionic-team/capacitor-plugins#2627 ·
メンテナーはふだん 1 日以内に返信
-
triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ionic-team/capacitor-plugins#2616 ·
メンテナーはふだん 1 日以内に返信
-
[@capacitor/app] iOS: 'Expression implicitly coerced from String? to Any' warning in getAppLanguageオープンtriage
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
ionic-team/capacitor-plugins#2604 ·
メンテナーはふだん 1 日以内に返信
-
bug(action-sheet, camera): on iPhone with Liquid Glass, action sheets show as a popover without the Cancel action対応中かも @arblitroshani が 1 日前に担当しました。 オープンplatform: ios
難易度 3/5 1〜2日 初心者へのやさしさ 20/100
ionic-team/capacitor-plugins#2630 ·
メンテナーはふだん 1 日以内に返信
-
bug(status-bar): iOS WebView moves under the status bar after a full-screen modal is dismissed対応中かも @kidzki が 1 日前に担当しました。 オープンplatform: ios
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
ionic-team/capacitor-plugins#2625 ·
メンテナーはふだん 1 日以内に返信
ionic-team/capacitor-plugins の issue をすべて見る
似ている issue
-
account bug exercise lecture programming user interface
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ls1intum/Artemis#14512 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
swiftlang/swift-java#955 ·
メンテナーはふだん 1 日以内に返信
-
Good First Issue
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
hiero-ledger/hiero-sdk-java#3044 ·
メンテナーはふだん 1 日以内に返信
-
A second build without clean fails in resources-optimizer-maven-plugin because minified files are minified again対応中かも @papegaaij が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
hermes-queue
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
chrisalunlloyd2-sudo/mindpalace#337 ·
メンテナーはふだん 1 日以内に返信