加载相机应用后,iOS 8网络应用程序屏幕缩小

我正在构建一个Web应用程序,并遇到iOS 8的问题.请注意这是特定于iOS 8,因为它在以前的版本中工作正常.

我有一个页面可以上传直接从手机或平板电脑拍摄的图像.我使用以下链接调用相机应用程序:

<input type="file" accept="image/*" capture="camera" name="files[]">

相机应用程序按预期打开并拍摄照片没有问题.但是,当相机应用程序关闭并返回到Web应用程序时,屏幕高度会减少一半以上.没有办法纠正关闭和重新启动应用程序的期望.

在这里拍照后你可以看到它的外观:
Screencast

看起来好像屏幕仍处于横向状态.然而,旋转设备只会使情况变得更糟.

我假设这是一个iOS 8错误,但想知道是否有人对如何纠正或解决问题有任何想法.

最后一点,只有在作为Web应用程序运行时才会出现此问题.使用safari时它可以工作.

仅供参考 – 这是我正在使用的元标记

<!-- Run in full-screen mode. -->
        <Meta name="apple-mobile-web-app-capable" content="yes">
        <Meta name="mobile-web-app-capable" content="yes">

        <!-- Make the status bar black with white text. -->
        <Meta name="apple-mobile-web-app-status-bar-style" content="black">

        <!-- Customize home screen title. -->
        <Meta name="apple-mobile-web-app-title" content="DigiSite">

        <!-- disable phone number detection. -->
        <Meta name="format-detection" content="telephone=no">

        <!-- Set viewport. -->
        <Meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">

        <!-- Startup images -->

        <!-- iOS 6 & 7 iPad (retina,portrait) -->
        <link href="http://img.digisite.us/splash.png?w=1536&h=2008&c=<br />
<b>Notice</b>:  Undefined index: background in <b>/home5/digisite/public_html/mobile/mobileHeader.PHP</b> on line <b>22</b><br />
&n=lumentum"
        media="(device-width: 768px) and (device-height: 1024px)
        and (orientation: portrait)
        and (-webkit-device-pixel-ratio: 2)"
        rel="apple-touch-startup-image">

        <!-- iOS 6 & 7 iPad (retina,landscape) -->
        <link href="http://img.digisite.us/splash.png?w=1496&h=2048&c=&n=lumentum"
        media="(device-width: 768px) and (device-height: 1024px)
        and (orientation: landscape)
        and (-webkit-device-pixel-ratio: 2)"
        rel="apple-touch-startup-image">

        <!-- iOS 6 iPad (portrait) -->
        <link href="http://img.digisite.us/splash.png?w=768&h=1004&c=&n=lumentum"
        media="(device-width: 768px) and (device-height: 1024px)
        and (orientation: portrait)
        and (-webkit-device-pixel-ratio: 1)"
        rel="apple-touch-startup-image">

        <!-- iOS 6 iPad (landscape) -->
        <link href="http://img.digisite.us/splash.png?w=748&h=1024&c=&n=lumentum"
        media="(device-width: 768px) and (device-height: 1024px)
        and (orientation: landscape)
        and (-webkit-device-pixel-ratio: 1)"
        rel="apple-touch-startup-image">

        <!-- iOS 6 & 7 iPhone 5 -->
        <link href="http://img.digisite.us/splash.png?w=640&h=1096&c=&n=lumentum"
        media="(device-width: 320px) and (device-height: 568px)
        and (-webkit-device-pixel-ratio: 2)"
        rel="apple-touch-startup-image">

        <!-- iOS 6 & 7 iPhone (retina) -->
        <link href="http://img.digisite.us/splash.png?w=640&h=920&c=&n=lumentum"
        media="(device-width: 320px) and (device-height: 480px)
        and (-webkit-device-pixel-ratio: 2)"
        rel="apple-touch-startup-image">

先谢谢你.

解决方法

我在运行iOS8的iPad 2上看到了同样的问题.它似乎与您打开应用程序的方向有关.如果我们以纵向(垂直)模式打开应用程序,然后切换到横向(水平)它工作正常.只有在横向打开应用程序时,视口才会缩小.

我无法在iOS7上重现此问题.

拍照前:

拍照后:

相关文章

当我们远离最新的 iOS 16 更新版本时,我们听到了困扰 Apple...
欧版/美版 特别说一下,美版选错了 可能会永久丧失4G,不过只...
一般在接外包的时候, 通常第三方需要安装你的app进行测...
前言为了让更多的人永远记住12月13日,各大厂都在这一天将应...