简体   繁体   English

iOS 7全屏Web应用程序中的JavaScript警报已损坏?

[英]JavaScript Alerts in iOS 7 Fullscreen Web Apps Broken?

JavaScript alerts, prompts and confirmations don't seem to be working when invoked from a fullscreen web app run from the homescreen. 当从主屏幕运行的全屏Web应用程序调用JavaScript警报,提示和确认时,它们似乎不起作用。 They work fine when in Safari, just not when run fullscreen from the home screen. 它们在Safari中运行良好,而在从主屏幕全屏运行时则无法正常工作。 I submitted a bug request but maybe I'm missing something special in iOS 7? 我提交了一个错误请求,但也许我错过了iOS 7中的一些特殊功能?

Here's sample code: 这是示例代码:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Fullscreen Web App Alert Test</title>
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
</head>
<body>
<p><a href="javascript: alert('Hello World');">This is an alert</a></p>
<p><a href="javascript: s = prompt('Enter something');">This is a prompt</a></p>
<p><a href="javascript: confirm('Are you sure?');">This is a confirmation</a></p>
</body>
</html>

这是iOS 7.0.3中修复的错误

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM