ios - 在 iframe 中填写表单时 iOS 中的问题
问题描述
我有一个包含表单的 iframe。在台式机和安卓设备以及 iPad 上一切正常。但在 iphone 8+ 和 iphone 7、iOS - 11.3 的情况下,当我开始在此 iframe 中的任何字段(文本字段或文本区域)内输入时,页面会自动滚动到底部,因此用户无法看到他/她在字段中输入的数据。iOS 中的 Safari 和 chrome 都会发生这种情况。iframe 初始化如下:
<iframe ng-src="myUrl" ng-if="model.seat.survey_url" width="100%" height="100%" border="0" style="border-style: none; height:100%;overflow:hidden;width: 100%;" scrolling="no"></iframe>
这个 iframe 在 bootstrap modal 中加载,并且已经使用了 angularjs。
解决方案
如果可以,请尝试将以下 CSS 添加到父页面,它为我解决了同样的问题。
html, body {
height: 100%;
overflow: auto;
-webkit-overflow-scrolling: touch;
}
推荐阅读
- python - SQLAlchemy-执行存储过程并填充类
- python-3.x - 诺依曼发电机计数
- php - 用 php 显示存储在数据库中的家谱树
- jenkins - 詹金斯作业参数
- algorithm - 通过删除一项来计算使序列排序的方法数
- host - TeamViewer Host 仅在有人登录时工作
- bash - 在 VSTS 中创建将在后台运行的命令
- python - 使用 Estimator API 在大字符串上训练 RNN
- testing - 如何在测试中模拟外部依赖项?
- google-app-engine - 如何从 Cloud Storage 存储桶提供 App Engine 网站的 /static/ 目录内容?