Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-13448

css safe-area-inset-top is 20px on non-iPhone X landscape

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not A Problem
    • Affects Version/s: cordova-ios@4.5.1
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      iPhone 7, iOS 11.0.3

      Description

      the css constant 'safe-area-inset-top' appears to be correct in the iPhone X simulator.
      On other devices running on iOS 11 however, it seems to be returning incorrect values.
      I'm getting 20px when holding my iPhone 7 in landscape, and 0px when holding my phone in portrait.
      This seems incorrect to me since the status bar is hidden in landscape, and visible in portrait. So I'd expect it to be the other way around, 20px in portrait and 0px in landscape.

      In these screenshots I've created a square with css rule `top: constant(safe-area-inset-top);`
      portrait:

      landscape:

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Jespertheend Jesper van den Ende
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: