Project

General

Profile

Actions

Bug #1333

open
रअ SS

env(safe-area-inset-top) incorrectly resolves to 30px in non-fullscreen mode

Bug #1333: env(safe-area-inset-top) incorrectly resolves to 30px in non-fullscreen mode

Added by राही अखेराजोत 3 days ago. Updated 1 day ago.

Status:
Feedback
Priority:
3.x
Start date:
09/18/2026
Due date:
% Done:

0%

Estimated time:

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

Safe Area.png (118 KB) Safe Area.png Soren Stoutner, 09/19/2026 04:48 PM
Safe Area.png
Actions

Also available in: PDF Atom