简体   繁体   中英

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. They work fine when in Safari, just not when run fullscreen from the home screen. I submitted a bug request but maybe I'm missing something special in 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中修复的错误

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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