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

Web view shrinks after locking screen orientation

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • 1.4.2
    • None
    • None
    • Using:

      • Cordova CLI 6.2.0
      • cordova-ios 4.1.1
      • Xcode 7.3
      • OSX 10.11.5

      Best reproduced on an iOS simulator with iPhone 6s Plus and iOS 9.3.

    • Important

    Description

      Since version 1.4.2 "screen.lockOrientation" works on iOS 9, but for some reason, in some phones the dimensions of the web view are wrong after changing to the new orientation.

      Before locking:

      After locking:

      Steps to reproduce:
      1) Prepare a cordova app including cordova-plugin-screen-orientation.
      2) Run the application on a Xcode simulator for iPhone 6s Plus and iOS 9.3.
      3) Rotate the simulator to the left (menu -> Hardware -> Rotate left).
      4) Open the Safari web inspector connected to the app running on the simulator.
      5) In the console, run: window.screen.lockOrientation("portrait-primary")
      6) The width of the resulting "<body>" is shrink, as reported by the Safari web inspector (e.g. in my case to 92px whereas it should be 414px).

      Attachments

        1. cb-11423-joe1.png
          22 kB
          Tony Homer
        2. cb-11423-joe2.png
          19 kB
          Tony Homer

        Issue Links

          Activity

            People

              tony-- Tony Homer
              rbarriuso Rafael Barriuso
              Votes:
              10 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: