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"> <name>Test-App</name> <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" /> </widget>
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> </head> <body style="background: #616161; margin-top: 20px;"> <input type="file"> </body> <script src="cordova.js"></script> </html>
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?