iOS 7 does not show more than one line in html options:

<select>
  <option value="volvo">Volvo test test test test test test </option>
  <option value="saab">Saab</option>
  <option value="opel">Opel</option>
  <option value="audi">Audi</option>
</select>

It just truncates it with ellipsis. Has anyone else noticed this with just a standard HTML option?

Perhaps it is an iOS 7 bug because it was not happening on iOS6? I pulled this directly from the w3schools site.

To reproduce, take your iPhone running iOS 7 and go to this jsFiddle.

Obviously you can see the question once selected. But with a mobile optimized phone you will not see the entire question.

Unless I am missing something here.

有帮助吗?

解决方案 2

Looks like it now requires the <optgroup> standard to wrap the options.

Problem solved.

其他提示

Add an empty optgroup at the end of the select list:

 <select>
  <option selected="" disabled="">Select a value</option>
  <option>Grumpy wizards make toxic brew for the evil Queen and Jack</option>
  <option>Quirky spud boys can jam after zapping five worthy Polysixes</option>
  <option>The wizard quickly jinxed the gnomes before they vaporized</option>
  <option>All questions asked by five watched experts amaze the judge</option>
  <optgroup label=""></optgroup>
 </select>
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top