chore: sync upstream PR #8366 - fix(android): implement automatic edge-to-edge and universal keyboard handling - #94
chore: sync upstream PR #8366 - fix(android): implement automatic edge-to-edge and universal keyboard handling#94riderx wants to merge 17 commits into
Conversation
…iew support - Add cachedWebViewMajorVersion field to avoid repeated WebView version lookups - Add handleOnResume() override to refresh insets on app resume - Add WindowCompat.setDecorFitsSystemWindows() calls in load(), handleOnResume(), and onDOMReady() - Add null check in setStyle() PluginMethod for safer style parameter handling - Preserve backup's applyInsets() implementation with legacy WebView compatibility - Add setViewMargins() and resetViewBottomMargin() for legacy WebView workaround - Use MIN_INSETS_VERSION (LOLLIPOP) instead of VANILLA_ICE_CREAM for broader SDK support - Use INSETS_HANDLING_CSS constant instead of hardcoded string literal - Remove unused setViewBottomMargin() and getBottomInset() methods - Rename viewportMetaJSFunction to VIEWPORT_META_JS constant Fixes edge-to-edge display issues on devices with various WebView versions.
…lder Android - Add support for API 21-34 by using LOLLIPOP instead of VANILLA_ICE_CREAM - Add legacy fallback for WebView < 140 on Android API < 30 that forces CSS safe-area vars to 0 to prevent double compensation in footer/tab-bar layouts - Preserve original legacy IME margins behavior for Android 11+ (API 30-33) - Fixes ionic-team#8394: CSS safe-area-inset-x not being applied on Android API <= 34
Scope legacy fallback to Android API < 30 and force zero CSS safe-area vars in that path to prevent double compensation on top/bottom bars, while preserving behavior on newer API levels.
Keep top safe-area inset at 0 for Android API < 30 (legacy and modern WebView paths), preserve semantic bottom inset handling, and prevent malformed safe-area CSS custom properties from persisting across keyboard/lifecycle transitions. Se vuoi una versione con riferimento issue: fix(android): stabilize safe-area CSS behavior on API < 30 (ionic-team#8394) Keep top safe-area inset at 0 for Android API < 30 (legacy and modern WebView paths), preserve semantic bottom inset handling, and prevent malformed safe-area CSS custom properties from persisting across keyboard/lifecycle transitions.
…preferred conflicts)
|
Git applied the upstream-preferred strategy to resolve this sync. Please review the branch carefully before merging. |
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 59 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
Comment |
Beta npm buildMaintainers can publish one Capacitor Plus workspace package from this PR to npm for fast testing. Comment Examples: /publish-beta core
/publish-beta cli
/publish-beta @capacitor-plus/coreIf exactly one workspace package changed, Packages:
The workflow will:
Security note: beta publish is only enabled for branches inside this repository. |
There was a problem hiding this comment.
Risk: medium. Cursor Bugbot was not present on this PR, and no automated review reported findings requiring human attention. Approved as a focused upstream Android SystemBars sync with bounded edge-to-edge and keyboard handling changes. No reviewers assigned.
Sent by Cursor Approval Agent: Pull Request Approver
There was a problem hiding this comment.
Risk: medium. Not approving — the Android SystemBars edge-to-edge/keyboard changes exceed the low-risk approval threshold. Human review is needed; reviewer assignment failed because no eligible collaborators are available outside the PR author.
Sent by Cursor Approval Agent: Pull Request Approver External
Not merging this one — it competes with what already landedLeaving this open rather than merging. It rewrites the same Android insets/edge-to-edge code path as two other changes, and only one of the three can win.
Signals that pushed me toward not landing it:
Verifying which behaves correctly needs real devices across API 31–35 with and without the keyboard, which I cannot do here, and guessing on core Android UI in production fork infrastructure is not worth it. What I'd suggest: treat #67 as the edge-to-edge fix for Posted by an AI agent (Cursor). |
Re-checked against current
|
| marker | plus today |
after taking this PR |
|---|---|---|
VANILLA_ICE_CREAM — upstream #8424, merged upstream, landed here via #70 |
2 | 0 |
getBottomInset — workaround for chromium 457682720, wrong bottom inset while the IME is visible |
2 | 0 |
The getBottomInset removal is deliberate in this PR's own history — commit 6cffa1a says "Remove unused setViewBottomMargin() and getBottomInset() methods". That lines up exactly with the regression @prajapatijay95 reported upstream: "it fixes the webview issue on the SDK <= 34. But noticed, scroll is blocked when keyboard is opened."
So this is not a conflict to resolve, it is a revert of two fixes already shipped on plus, in favour of a branch that has had no upstream review, is CONFLICTING against upstream main, and has not been touched since 2026-04-15.
#67 covers the same ground without that cost — it is purely additive, keeps both markers at 2, and additionally restores the insetsHandling: "disable" guard. I have unblocked it and it is on track to merge.
Recommendation: close this in favour of #67. I have left it open rather than closing unilaterally, since it was explicitly on your merge list. Say the word either way.
Posted by an AI agent (Cursor).
|
Closing this. Merging it would revert two fixes already on |
|
Closing per Martin's confirmation. Merging this would revert two fixes already shipped on Edge-to-edge is covered by #67, which is merged and purely additive. Posted by an AI agent (Cursor). |


Merge Conflict Review Required
The sync of upstream PR ionic-team#8366 from @fabiomartino encountered merge conflicts.
Original PR: ionic-team#8366
What happened
Synced from upstream by Capacitor+ Bot