select dropdown not active on Android browser

admin

Administrator
Staff member
I have a problem where a drop-down select box does not drop-down (it's essentially inactive) when viewed on an Android mobile device. It works fine on desktop browsers as well as ios browser - bringing up a picker wheel on ios and a dropdown select list from the desktop.

Sample code is;

Code:
<select id = "log_or_norm" autofocus>
<option value="1">Lognormal</option>
<option value="2">Normal</option>
</select>

I tried the suggestion found at;
<a href="http://youngliferamblings.wordpress.com/2011/08/09/select-dropdown-in-android-webview/">http://youngliferamblings.wordpress.com/2011/08/09/select-dropdown-in-android-webview/</a>

which was

<blockquote>
The select tag just doesn’t work sometimes in Android, especially in an app using webview. This drove me nuts for a long long time. The main fix I found, even if your select is buried deep in divs and rows and what ever, is this css:

select {
visibility: visible;
-webkit-appearance: menulist-text;
}

The -webkit-appearance might be the only one actually needed and setting it to ‘listbox’ works too.

That’s all. This deserved its own post.
</blockquote>

Without luck....

Am hoping that one of the gurus here can provide an elegant solution that will avoid me having to go down the route of making discrete buttons for each option. I'm not fussed as to whether the Android experience gets a nice picker wheel or not, but need to be able to allow Android users to select an option.

Thanking you in advance