Is there any way to use JavaScript to detect whether a given browser renders a focused <select multiple>
element as a popup or solely as an inline box?
On some platforms, such as the Android Browser and iOS Safari, the use of a popup can be detected by comparing the heights of, say,
<select multiple>
<option>a</option>
<option>a</option>
<option>a</option>
<option>a</option>
<option>a</option>
<select>
and
<select multiple>
<option>a</option>
<select>
The heights are the same because the <select>
s get reduced to a single box with a dropdown button. But on other devices, such as the Playbook, this test would give a false negative, since the Playbook browser renders expanded select lists and shows popups when they're clicked.
Can anyone think of a reliable way to determine whether a native select popup is shown?