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

screen-orientation puts inappbrowser in background

    XMLWordPrintableJSON

Details

    Description

      Migrated from Issue #99

      from lkounadis:

      I have a problem when trying to use this plugin with inappbrowser plugin.
      The web app is originally set to portrait, and at some point I am trying to open an inAppBrowser and unlock the screen orientation.

      I have tried to open and set using the code bellow, but both cases put the inAppBrowser to the background:

      screen.unlockOrientation();
      cordova.InAppBrowser.open(url, target, options);
      OR
      cordova.InAppBrowser.open(url, target, options);
      screen.unlockOrientation();

      The only way I have got it to work correctly is by setting the inappbrowser to open using a timeout:

      screen.unlockOrientation();
      setTimeout(function(){
      cordova.InAppBrowser.open(url, target, options);
      },100)

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: