0 Replies Latest reply on Aug 30, 2016 10:51 AM by martinb77004568

    iOS statusbar plugin resizes the WebView

    martinb77004568 Level 2



      I am using the statusbar plugin. My problem is: The WebView resizes when clicking on a file input and rotating the screen. I have tested it on an iPhone 5s.


      How to reproduce?

      Use the following setup:


      <?xml version="1.0" encoding="UTF-8" ?>
      <widget xmlns   = "http://www.w3.org/ns/widgets"
              xmlns:android = "http://schemas.android.com/apk/res/android"
              xmlns:gap   = "http://phonegap.com/ns/1.0"
              id          = "com.example.example"
              version        = "1.0.0"
              versionCode = "1">
          <description>An example</description>
          <access origin="*" />
          <preference name='phonegap-version' value='cli-6.3.0' />
          <platform name="ios" />
          <content src="index.html" />
          <plugin name="cordova-plugin-statusbar" source="git" spec="https://github.com/apache/cordova-plugin-statusbar" />



      <!DOCTYPE html>
              <meta name="viewport" content="width=device-width, initial-scale=1">
          <body style="background: #616161; margin-top: 20px;">
              <input type="file">
          <script src="cordova.js"></script>



      Now, open the app in landscape mode. It will look like this:



      Click in the file input, go to the photo library. Now, rotate your screen to portrait mode and hit "cancel". You will see something like this:




      And no: This image hasn't been cropped :-)


      What can I do to prevent this? I don't want to lock the screen orientation and I need the statusbar plugin. I have tested it with the one from NPM as well but it didn't help. Is there anything I can do?