Android's Drop Down Bug
On and off for several days now I have been trying to fix an issue where a drop down list (<select>
tag) seems to be disabled on old (version 2.x) Android devices. Apparently this is a known bug with plenty of suggested fixes. Not a single one (or combination) worked for me. I even came across this suggestion since we are using iScroll, but it did not help either.
What was my solution?
Wanting to rule out any jQuery or Knockout issues, I added a simple, hard-coded drop down above the one I was having issues with:
<select>
<option>One</option>
<option>Two</option>
</select>
And to no surprise, it did not work…however, now my original drop box did work! Unfortunately I cannot explain it nor can I take the time right now to figure it out, but I thought I would share anyway.
Obviously I could not have a random drop down on the screen so I just hid it using the following:
//CSS
#oldAndroidSelectFix { left: -9999px; }
// HTML
<select id="oldAndroidSelectFix">
<option>One</option>
<option>Two</option>
</select>
If you run into this issue I encourage you to start with the official bug report: Android Issue 10280: browser - inactive dropdowns. There are several steps to try before using a horrible hack like mine.