Conversation
Greptile SummaryThis PR fixes the WebView resize issue when the soft keyboard appears on Android by introducing a new Key changes:
Issues found:
Confidence Score: 3/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Hook as post-process.js (Cordova Hook)
participant MA as MainActivity.java (patched)
participant SIA as SoftInputAssist
participant CV as contentView (android.R.id.content)
participant OS as Android OS
Hook->>MA: inject import com.foxdebug.system.SoftInputAssist
Hook->>MA: inject field: private SoftInputAssist softInputAssist
Hook->>MA: inject in onCreate: softInputAssist = new SoftInputAssist(this)
MA->>SIA: new SoftInputAssist(activity) [in onCreate]
SIA->>CV: ViewCompat.setWindowInsetsAnimationCallback(...)
OS-->>SIA: onProgress(insets, runningAnimations) [keyboard animation frame]
SIA->>SIA: keyboardHeight = max(0, ime.bottom - nav.bottom)
SIA->>CV: setPadding(0, 0, 0, keyboardHeight)
Note over OS,CV: ⚠️ If keyboard appears without animation,<br/>onProgress is never called → padding stays 0
Last reviewed commit: 8d0300e |
src/plugins/system/android/com/foxdebug/system/SoftInputAssist.java
Outdated
Show resolved
Hide resolved
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
….java Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
|
Up port this fix to cordova android repo, if possible. |
src/plugins/system/android/com/foxdebug/system/SoftInputAssist.java
Outdated
Show resolved
Hide resolved
This is a WebView/Chromium issue (https://issues.chromium.org/issues/396827865 |
I guess they might not, as referenced in apache/cordova-android#1880 (comment) |
….java Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
No description provided.