@capgo/capacitor-inappbrowser 8.10.4 → 8.10.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -54,6 +54,19 @@ final class SafeAreaInsetsSupport {
|
|
|
54
54
|
);
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
+
/**
|
|
58
|
+
* Absolute IME insets from the window decor must only be applied as layout margins when the
|
|
59
|
+
* dialog is edge-to-edge. Pre-Android 15 windows still fit system windows and are resized for
|
|
60
|
+
* the soft keyboard; applying decor IME height again leaves a black gap above the keyboard.
|
|
61
|
+
*/
|
|
62
|
+
static int resolveImeBottomInset(boolean keyboardVisible, int imeBottom, boolean applyImeAsLayoutMargin) {
|
|
63
|
+
if (!keyboardVisible || !applyImeAsLayoutMargin || imeBottom <= 0) {
|
|
64
|
+
return 0;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return imeBottom;
|
|
68
|
+
}
|
|
69
|
+
|
|
57
70
|
static int resolveBottomMargin(boolean enabledSafeBottomMargin, int safeBottomInset, int imeBottom) {
|
|
58
71
|
int bottomInset = enabledSafeBottomMargin ? safeBottomInset : 0;
|
|
59
72
|
return Math.max(bottomInset, imeBottom);
|
|
@@ -3056,7 +3056,16 @@ public class WebViewDialog extends Dialog implements ProxyResponseRouting.ProxyR
|
|
|
3056
3056
|
toolbarView != null &&
|
|
3057
3057
|
toolbarView.getVisibility() == View.VISIBLE &&
|
|
3058
3058
|
toolbarView.getParent() instanceof com.google.android.material.appbar.AppBarLayout;
|
|
3059
|
-
applySafeAreaMargins(
|
|
3059
|
+
applySafeAreaMargins(
|
|
3060
|
+
bars,
|
|
3061
|
+
navigationBars,
|
|
3062
|
+
systemGestures,
|
|
3063
|
+
mandatoryGestures,
|
|
3064
|
+
ime,
|
|
3065
|
+
keyboardVisible,
|
|
3066
|
+
appBarHandlesTopInset,
|
|
3067
|
+
isAndroid15Plus
|
|
3068
|
+
);
|
|
3060
3069
|
|
|
3061
3070
|
return windowInsets;
|
|
3062
3071
|
});
|
|
@@ -3139,7 +3148,8 @@ public class WebViewDialog extends Dialog implements ProxyResponseRouting.ProxyR
|
|
|
3139
3148
|
Insets mandatoryGestures,
|
|
3140
3149
|
Insets ime,
|
|
3141
3150
|
boolean keyboardVisible,
|
|
3142
|
-
boolean appBarHandlesTopInset
|
|
3151
|
+
boolean appBarHandlesTopInset,
|
|
3152
|
+
boolean applyImeAsLayoutMargin
|
|
3143
3153
|
) {
|
|
3144
3154
|
if (_webView == null || _options == null) {
|
|
3145
3155
|
return;
|
|
@@ -3163,7 +3173,9 @@ public class WebViewDialog extends Dialog implements ProxyResponseRouting.ProxyR
|
|
|
3163
3173
|
fallbackBottomInset,
|
|
3164
3174
|
_options.getEnabledSafeMargin()
|
|
3165
3175
|
);
|
|
3166
|
-
|
|
3176
|
+
// Android 15+ uses edge-to-edge (decorFitsSystemWindows=false) and needs IME as margin.
|
|
3177
|
+
// Older dialogs still resize for the keyboard; re-applying decor IME creates a black gap (#622).
|
|
3178
|
+
int imeBottom = SafeAreaInsetsSupport.resolveImeBottomInset(keyboardVisible, ime.bottom, applyImeAsLayoutMargin);
|
|
3167
3179
|
boolean applyTopFallback = _options.getEnabledSafeTopMargin() && _options.getUseTopInset();
|
|
3168
3180
|
int fallbackTopInset = applyTopFallback ? getSystemStatusBarHeight() : 0;
|
|
3169
3181
|
int navTop = SafeAreaInsetsSupport.resolveTopMarginWithFallback(
|
|
@@ -199,7 +199,7 @@ public class CapgoInAppBrowserPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
199
199
|
case aware = "AWARE"
|
|
200
200
|
case fakeVisible = "FAKE_VISIBLE"
|
|
201
201
|
}
|
|
202
|
-
private let pluginVersion: String = "8.10.
|
|
202
|
+
private let pluginVersion: String = "8.10.5"
|
|
203
203
|
public let identifier = "CapgoInAppBrowserPlugin"
|
|
204
204
|
public let jsName = "CapgoInAppBrowser"
|
|
205
205
|
public let pluginMethods: [CAPPluginMethod] = [
|