Capacitor Version
馃拪 Capacitor Doctor 馃拪
Latest Dependencies:
@capacitor/cli: 8.4.1
@capacitor/core: 8.4.1
@capacitor/android: 8.4.1
@capacitor/ios: 8.4.1
Installed Dependencies:
@capacitor/ios: not installed
@capacitor/core: 8.4.1
@capacitor/android: 8.4.1
@capacitor/cli: 8.4.1
[success] Android looking great! 馃憣
Other API Details
Platforms Affected
Current Behavior
When configuring the @capacitor/splash-screen plugin with launchAutoHide: false and hiding it programmatically after a delay, the CSS Safe Area variables (--safe-area-inset-*) are improperly set on Android 12 (with WebView 140+).
Specifically, after SplashScreen.hide() resolves, the app UI renders with unexpected top and bottom spacing/padding. The WebView itself is not running in edge-to-edge mode (it sits below the system status bar), yet the CSS variables still receive positive values (e.g., --safe-area-inset-top: 30px; --safe-area-inset-bottom: 48px;) instead of falling back to 0px.
Note: This behavior only occurs during a clean Cold Start from the App Launcher. When running the app directly via the CLI (pnpm cap run android), the window lifecycle shifts slightly and the issue does not trigger.
Expected Behavior
When SplashScreen.hide() is called, the CSS Safe Area variables should correctly reflect the final state of the WebView layout container. If the WebView is not running in edge-to-edge/fullscreen mode under the system bars, the CSS variables (--safe-area-inset-top and --safe-area-inset-bottom) should evaluate to 0px to avoid layout gaps.
Project Reproduction
https://github.com/luisbytes/safe-area-12
Additional Information
@theproducer Additional screenshots showcasing the visual bug across different WebView versions can be found in the README.md file of the minimal reproduction repository attached below.
Capacitor Version
馃拪 Capacitor Doctor 馃拪
Latest Dependencies:
@capacitor/cli: 8.4.1
@capacitor/core: 8.4.1
@capacitor/android: 8.4.1
@capacitor/ios: 8.4.1
Installed Dependencies:
@capacitor/ios: not installed
@capacitor/core: 8.4.1
@capacitor/android: 8.4.1
@capacitor/cli: 8.4.1
[success] Android looking great! 馃憣
Other API Details
Platforms Affected
Current Behavior
When configuring the
@capacitor/splash-screenplugin withlaunchAutoHide: falseand hiding it programmatically after a delay, the CSS Safe Area variables (--safe-area-inset-*) are improperly set on Android 12 (with WebView 140+).Specifically, after
SplashScreen.hide()resolves, the app UI renders with unexpected top and bottom spacing/padding. The WebView itself is not running in edge-to-edge mode (it sits below the system status bar), yet the CSS variables still receive positive values (e.g.,--safe-area-inset-top: 30px; --safe-area-inset-bottom: 48px;) instead of falling back to0px.Note: This behavior only occurs during a clean Cold Start from the App Launcher. When running the app directly via the CLI (
pnpm cap run android), the window lifecycle shifts slightly and the issue does not trigger.Expected Behavior
When
SplashScreen.hide()is called, the CSS Safe Area variables should correctly reflect the final state of the WebView layout container. If the WebView is not running in edge-to-edge/fullscreen mode under the system bars, the CSS variables (--safe-area-inset-topand--safe-area-inset-bottom) should evaluate to0pxto avoid layout gaps.Project Reproduction
https://github.com/luisbytes/safe-area-12
Additional Information
@theproducer Additional screenshots showcasing the visual bug across different WebView versions can be found in the
README.mdfile of the minimal reproduction repository attached below.