Bug #1333
openenv(safe-area-inset-top) incorrectly resolves to 30px in non-fullscreen mode
0%
Description
In non-fullscreen mode, the browser reports "env(safe-area-inset-top)" as "30px", while the same page reports "0px" in fullscreen mode.
This causes an unexpected 30px top inset in web applications that use the safe-area API.
Reproduction
<!doctype html>
<html>
<head>
<meta name="viewport"
content="width=device-width, initial-scale=1, viewport-fit=cover">
<style>
#test {
padding-top: env(safe-area-inset-top);
}
</style>
</head>
<body>
<div id="test">Test</div>
<script>
console.log(getComputedStyle(document.querySelector('#test')).paddingTop
);
</script>
</body>
</html>
You can also check
https://webkit.org/demos/safe-area-insets/safe-areas.html
Actual
Non-fullscreen: "30px"
Fullscreen: "0px"
Expected
"env(safe-area-inset-top)" should reflect the actual safe-area inset and should not report "30px" when there is no corresponding unsafe area.
Files
रअ Updated by राही अखेराजोत 3 days ago
- Tracker changed from Feature to Bug
SS Updated by Soren Stoutner 1 day ago
- File Safe Area.png Safe Area.png added
- Status changed from New to Feedback
- Assignee set to Soren Stoutner
Which version of Android and Android SystemWebView are you running? This problem does not manifest for me on:
Privacy Browser
Version 3.20.1 (version code 81)
Hardware
Brand: google
Manufacturer: Google
Model: Pixel 10a
Device: stallion
Bootloader: stallion-17.0-15199480
Radio: g5400i-260317-260429-B-15308590,g5400i-260317-260429-B-15308590
Software
Android: 17 (API 37)
Security Patch: 2026-08-05
Build: CP2A.260805.005
Kernel: 6.1.157-android14-11-gbd23337e42e7-ab14791245
WebView Provider: com.google.android.webview
WebView Version: 151.0.7922.199
Orbot: 17.9.5-RC-4-tor-0.4.9.11
TorServices: 0.3.0
I2P: 2.11.0 (F-Droid flavor)
OpenKeychain: 6.0.4
Memory Usage
App Consumed Memory: 31.17 MiB
App Available Memory: 224.83 MiB
App Total Memory: 256.00 MiB
App Maximum Memory: 256.00 MiB
System Consumed Memory: 6,517.25 MiB
System Available Memory: 1,053.95 MiB
System Total Memory: 7,571.20 MiB
Filter Lists
UltraPrivacy: 4
UltraList: 1
EasyPrivacy: 202602192234
EasyList: 202602192234
Fanboy’s Annoyance List: 202602191150
Package Signature
Issuer DN: C=US, O=Android, CN=Android Debug
Subject DN: C=US, O=Android, CN=Android Debug
Start Date: Oct 27, 2021 8:56:17 PM MST
End Date: Oct 20, 2051 8:56:17 PM MST
Certificate Version: 1
Serial Number: 1
Signature Algorithm: SHA1withRSA