为什么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屋!