Note that there are some explanatory texts on larger screens.

plurals
  1. POHTML <select> element is abbreviated in iPhone or Android browsers
    primarykey
    data
    text
    <p>I'm in a bit of a situation with my HTML <strong>&lt;select&gt;</strong> dropdowns, when they are displayed in an iPhone or Android browser. I often need to render <strong>&lt;option&gt;</strong> labels that are quite long, such as for instance</p> <blockquote> <p>[AccountType] [EUR] - [Customer] - CH12 3456 7890 1234 5678 9</p> </blockquote> <p>On Android, this will render something like that:</p> <blockquote> <p><img src="https://i.stack.imgur.com/5Eloe.png" alt="android screen"></p> </blockquote> <p>On the iPhone it's even worse. While I like the native look and feel, the cropping of the labels is a no-go. Circled in red, you'll find how the dropdown itself is rendered. I could live with that. But check out the blue popup that appears, when I click on it. The user will never find his data...</p> <h2>PLEASE, before you answer...</h2> <p>... consider these points:</p> <ul> <li>I can abbreviate some information, but I will still have cases with long option labels in the select. So no need to tell me that the IBAN could be abbreviated, etc.</li> <li>I cannot rely on CSS styling of <strong>&lt;select&gt;</strong> or <strong>&lt;option&gt;</strong> elements.</li> <li>User hunter has already proposed the <strong>&lt;optgroup&gt;</strong> tag <a href="https://stackoverflow.com/questions/4554831/html-select-element-is-abbreviated-too-much-in-iphone-or-android-browsers#4554858">here</a>. That's quite a nice idea and will be a small workaround, but is not enough, as the IBAN is still cropped by both iPhone and Android browsers :-(</li> <li>I already know the very nice looking <a href="http://www.filamentgroup.com/lab/jquery_ui_selectmenu_an_aria_accessible_plugin_for_styling_a_html_select/" rel="nofollow noreferrer">jQuery UI Selectmenu prototype</a>. Unfortunately, it's not yet compatible with jquery-ui 1.8.5 and there is no guarantee when it will be stable.</li> <li>I am using jquery and jquery-ui 1.8.5, so any ideas / references to plugins are very welcome.</li> <li>Any other ideas to circumvent that problem <strong>GENERALLY</strong> are welcome.</li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload