【问题标题】:Intermittent HTML select freezes on Safari in iOS 15 onwards从 iOS 15 开始,Safari 上的间歇性 HTML 选择冻结
【发布时间】:2022-01-24 13:32:04
【问题描述】:
我们有一个用 HTML/Javascript 编写的单页应用程序,我们的客户在所有 iOS 15 版本的 iPad 上使用 HTML 选择下拉菜单时遇到间歇性冻结,但在 iOS 14 或更早版本上则不然。退出睡眠模式时似乎经常发生冻结。关闭 Safari 并重新打开可以解决问题,但如果没有保存输入等,仍然会带来不便。我们有一些旧的 jQuery Mobile 下拉菜单,但是这些和普通 JS 下拉菜单都会出现问题。
我们尝试过重启机器、检查存储、关闭任何 Safari 扩展、关闭 GPU Process Canvas Rendering(在 iOS 15 中似乎默认开启)等等。它似乎并不特定于特定的模型,因为用户有各种各样的模型。
我知道选择元素的 UI 在 iOS 15 中发生了变化——还有其他人遇到过这个问题吗?
【问题讨论】:
标签:
select
drop-down-menu
safari
freeze
ios15
【解决方案1】:
是的,我遇到了一个可能与您的问题有关的 HTML 选择问题:
- 使用 HTML 选择创建 PWA 的桌面快捷方式
- 打开 PWA
- 点击选择 => 应该会打开(确定)
- 按主页按钮
- 再次激活 PWA
- 点击选择 => 打不开
重新启动应用程序可以解决问题,直到下次重新启动。
检查在 iOS 15.1 到 15.4 上,所有系统都出现错误。适用于 iOS 14。我尚未发现报告的问题。
【解决方案2】:
我今天通过 feedbackassistant.apple.com 发布了一份错误报告,其中包括一段视频,显示了 @chris380 提到的错误(我认为这可能与您的问题有关)。
这是我用过的测试用例:
<html>
<head>
<meta name="viewport" content="width=device-width" />
<!-- iOS -->
<meta name="apple-mobile-web-app-capable" content="yes" /><!-- hide browser UI -->
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
<meta name="apple-mobile-web-app-title" content="select test">
<!-- Chrome for Android -->
<meta name="mobile-web-app-capable" content="yes">
</head>
<body>
<select>
<option value="1">Amiga</option>
<option value="2">Apple</option>
<option value="3">Atari</option>
<option value="4">Commodore 64</option>
<option value="5">MSX</option>
</select>
</body>
</html>
这是我发布给 Apple 的信息:
- Have a html file with <meta name="apple-mobile-web-app-capable" content="yes" /> and a select> or use my testcase (https://cms0-sites.webhare.com/pulldown-test/select-app.html)
- Use an iPhone/iPad/simulator on a device with home button and with any iOS 15 version (tested up till 15.4)
- Visit the html page in Safari and use the share button to add it to the home screen
- Open the app from the home screen
- Activate (tap) a pulldown
- Click on the home button on the bottom of the iPhone or iPad
- Now click on the icon on the home screen again
- What often happens: the options popup isn't closed or no pulldown on the page can open the options popup. If the options popup stays open you'll at first still be able to scroll it but you cannot get it to close.
- If it doesn't happen you can try to restart the device and retry above steps (starting from opening the homescreen app)
Some interesting points I notices:
- This bug seems to be triggered on devices with a home button. My guess is that this is because using a gesture on the screen to switch apps cause the pulldown to be closed and so prevents the bug from being triggered)
- switching to another web-capable page added to the homescreen and then switching back makes the pulldowns respond again(!)
Other reports:
- https://developer.apple.com/forums/thread/689901 (issue with ios 15 beta 8)
- https://developer.apple.com/forums/thread/691863 (issue with select reported on the final ios 15)
- https://developer.apple.com/forums/thread/699982 (mention of someone reporting it for iOS 15.1)