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

incorrect window dimensions reported

    XMLWordPrintableJSON

Details

    Description

      Migrated from Issue #40

      from deostroll:

      I suppose this is a race condition issue.

      On an android device (Samsung Galaxy Tab Note N7000) I've consumed this plugin. I have attempted to obtain window dimensions right after screen.lockOrientation() is called, and later in a window.setTimeout() callback. (All this in the same page).

      I have observed that they yielded different values.

      What this plugin actually needs is a state which tells developers that its safe to obtain window dimensions. I think this discrepancy is due to the fact that the code has tried to access the window dimensions before the WebView has completed modifying the state of window object.

      Attachments

        Activity

          People

            Unassigned Unassigned
            tony-- Tony Homer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: