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

orientationchange event fires off twice under iOS 5.x

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.5.0
    • 1.6.1
    • cordova-ios
    • None
    • Tested on iOS 5 iPod Touch, iOS 5 iPad and the iOS Simulator.
      Universal App with deployment target 5.0 using PhoneGap(Cordova) 1.5.0.

    Description

      The "orientationchange" event is called twice.
      Nothing from the original PhoneGap library is modified.
      I tested this ot two different applications, the one is nothing more than the code below.

      This is the code i use:

      function change(e)

      { console.log("change"); console.log(window.orientation); }

      document.addEventListener("orientationchange",change);

      Here are some of the logs i get from the above code:

      2012-03-06 19:39:12.353 Test[84253:207] [INFO] 0
      2012-03-06 19:39:12.359 Test[84253:207] [INFO] change
      2012-03-06 19:39:12.360 Test[84253:207] [INFO] 0
      2012-03-06 19:39:13.301 Test[84253:207] [INFO] change
      2012-03-06 19:39:13.303 Test[84253:207] [INFO] 90
      2012-03-06 19:39:13.305 Test[84253:207] [INFO] change
      2012-03-06 19:39:13.306 Test[84253:207] [INFO] 90
      2012-03-06 19:39:14.710 Test[84253:207] [INFO] change
      2012-03-06 19:39:14.712 Test[84253:207] [INFO] 180
      2012-03-06 19:39:14.715 Test[84253:207] [INFO] change
      2012-03-06 19:39:14.716 Test[84253:207] [INFO] 180
      2012-03-06 19:39:15.477 Test[84253:207] [INFO] change
      2012-03-06 19:39:15.480 Test[84253:207] [INFO] -90
      2012-03-06 19:39:15.485 Test[84253:207] [INFO] change
      2012-03-06 19:39:15.485 Test[84253:207] [INFO] -90

      Attachments

        Issue Links

          Activity

            People

              shazron Shazron Abdullah
              raptor Radoslav Todorov
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: