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?
It looks like masedesign is leading toward this, but I'm going to go one step further:
Perhaps detect mobile browsers vs non-mobile browser (eg. RIM, Android, iOS, etc VS FF, Chrome, Opera, Safari, IE, etc)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With