为什么 Safari Mobile 无法处理 iOS 8 上的许多输入字段 [英] Why does Safari Mobile have trouble handling many input fields on iOS 8
问题描述
iOS 8.0/8.0.1/8.0.2 有这个问题.
iOS 8.0/8.0.1/8.0.2 has this problem.
我有一个包含 70 个简单文本输入的页面:
I have a page with 70 simple text inputs:
<input class="" type="text">
在 iOS 7 上,页面没有问题.但是在 iOS 8 上,在一个字段中选择和输入会导致 iPad 变得缓慢和滞后.
On iOS 7 the page has no problems. But on iOS 8, selecting and typing in a field causes the iPad to become slow and laggy.
您可以在此jsFiddle中看到问题的示例
有人知道这个问题的解决方法吗???
Does anyone know a fix to this problem???
推荐答案
问题似乎与作为文档或表单一部分的文本输入的数量有关.
Seems the issue is related to the number of text inputs which are part of the document or a form.
我通过放置<form>修复"了这个问题.围绕一小组文本输入的标签.
I "fixed" the issue by placing <form> tags around small groups of text inputs.
<form>
<input type="text">
<input type="text">
<input type="text">
</form>
<form>
<input type="text">
<input type="text">
<input type="text">
</form>
等
在某些情况下,我在 <td> 中有带有单独文本字段的大表格.元素.您不能包含 <tr>或<td>表单中的元素,但必须包括整个<table>或个别<td>的内容元素.在这些情况下,我不得不放置一个 <form>每个文本输入周围的元素.
In some cases I had large tables with individual text fields in the <td> elements. You can't include <tr> or <td> elements in a form but rather must include the whole <table> or the content of individual <td> elements. In those cases I had to place a <form> element around each text input.
<table>
<tr>
<td>
<form>
<input type="text">
</form>
</td>
<td>
<form>
<input type="text">
</form>
</td>
</tr>
etc....
</table>
这篇关于为什么 Safari Mobile 无法处理 iOS 8 上的许多输入字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!