移动Safari多选错误 [英] Mobile Safari multi select bug
问题描述
$ b
< select multiple>
< option value =test1> Test 1< / option>
< option value =test2>测试2< / option>
< option value =test3> Test 3< / option>
< / select>
您将在自动选择时遇到问题!
在你打开select之后,iOS会自动选择第一个选项(没有任何用户交互),但它不会用蓝色选择check显示给你。
<因此,如果你现在选择第二个选项,选择将告诉你,选择了两个选项(但只选中一个作为选择)...
如果你现在关闭并再次打开选择,iOS会自动取消选择第一个值 - 如果您重复,它将被重新选择,而无需任何用户交互。
这是一个非常烦人的系统错误,这是打破用户体验!
Safari浏览器多选错误和空和禁用选项打勾相关问题:
在实际选项之前添加一个禁用和隐藏的optgroup。
If found a really annoying bug on the current (iOS 9.2) mobile safari (first appearing since iOS 7!)
If you using multi select fields on mobile safari - like this:
<select multiple>
<option value="test1">Test 1</option>
<option value="test2">Test 2</option>
<option value="test3">Test 3</option>
</select>
You will have problems with automatically selection!
iOS is automatically selecting the first option after you opened the select (without any user interaction) - but it will not show it to you with the blue select "check".
So if you now select the second option, the select will tell you that two options are selected (but only highlighting one as selected)...
If you now close and open the select again, iOS will automatically deselect the first value - if you repeat, it will be selected again without any user interaction.
Thats a really annoying system bug, which is breaking the user experience!
Solution for safari multi select bug and Empty and Disabled option tick related issue:
<select multiple>
<optgroup disabled hidden></optgroup>
<option value="0">All</option>
<option value="1">Test 1</option>
<option value="2">Test 2</option>
<option value="3">Test 3</option>
<option value="4">Test 4</option>
</select>
Add a disabled and hidden optgroup before the real options.
这篇关于移动Safari多选错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!