# HTML Dropdown does not show

**URL:** <https://forum.odk-x.org/t/html-dropdown-does-not-show/1175>\
**Category:** Support\
**Created:** [March 9, 2021, 3:50am UTC](https://forum.odk-x.org/t/html-dropdown-does-not-show/1175 "2021-03-09T03:50:25Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thien\_Mai](https://odkx.b-cdn.net/user_avatar/forum.odk-x.org/thien_mai/32/375_2.png) [@Thien\_Mai](https://forum.odk-x.org/u/Thien_Mai)\
**Post date:** [March 9, 2021, 3:50am UTC](https://forum.odk-x.org/t/html-dropdown-does-not-show/1175/1 "2021-03-09T03:50:25Z")

</div>

Hi,

I am upgrading ODK Table from version 2.0.6 to 2.1.6. I got the issue where a simple dropdown in html form does not show when I touch it. This is the html:

```
<!DOCTYPE html>
<html>
<body>
<h1>The select element</h1>
<p>The select element is used to create a drop-down list.</p>
<form>
      <label for="cars">Choose a car:</label>
      <select name="cars" id="cars">
           <option value="volvo">Volvo</option>
          <option value="saab">Saab</option>
          <option value="opel">Opel</option>
          <option value="audi">Audi</option>
      </select>
<input type="submit" value="Submit">
</form>
</body>
</html>

```

The issue only happens on Android 5.0/5.1 and on ODK Tables 2.1.6. When I run the form in ODK Tables 2.0.6, the issue is gone regardless of Android version.

Do you have any thoughts around the root cause?

---

<div class="post-metadata">

**Author:** ![linl33](https://odkx.b-cdn.net/letter_avatar_proxy/v4/letter/l/b487fb/32.png) [@linl33](https://forum.odk-x.org/u/linl33)\
**Post date:** [March 9, 2021, 3:58pm UTC](https://forum.odk-x.org/t/html-dropdown-does-not-show/1175/2 "2021-03-09T15:58:09Z")

</div>

Hi @Thien_Mai,

I’m able to reproduce this using the Android Emulator on version 5.1 (Google API). `select` elements in Survey doesn’t work either. I’ve opened an issue on our issue tracker. [Tables/Survey crash with HTML select on Android 5.1 · Issue #196 · odk-x/tool-suite-X · GitHub](https://github.com/odk-x/tool-suite-X/issues/196)

As a workaround, could you try updating the webview through Google Play?

---

<div class="post-metadata">

**Author:** ![Thien\_Mai](https://odkx.b-cdn.net/user_avatar/forum.odk-x.org/thien_mai/32/375_2.png) [@Thien\_Mai](https://forum.odk-x.org/u/Thien_Mai)\
**Post date:** [March 10, 2021, 1:58am UTC](https://forum.odk-x.org/t/html-dropdown-does-not-show/1175/3 "2021-03-10T01:58:57Z")

</div>

Thanks @linl3  
I updated webview to version 88 in Google Play. It did not work.

---

<div class="post-metadata">

**Author:** ![Thien\_Mai](https://odkx.b-cdn.net/user_avatar/forum.odk-x.org/thien_mai/32/375_2.png) [@Thien\_Mai](https://forum.odk-x.org/u/Thien_Mai)\
**Post date:** [March 10, 2021, 11:40am UTC](https://forum.odk-x.org/t/html-dropdown-does-not-show/1175/4 "2021-03-10T11:40:05Z")

</div>

Hi @linl33 ,

I found this log when the issue happens, hopefully it helps

> W/WindowManager: Attempted to add window with non-application token WindowToken{1d149669 null}. Aborting.

Also, I found this code causing the issue:

org.opendatakit.views.ODKWebView

> private static Context getFixedContext(Context context) {  
> return VERSION.SDK\_INT \>= 21 && VERSION.SDK\_INT \< 23 ? context.createConfigurationContext(new Configuration()) : context;  
> }

I know the logic here is to fix something related to Android 5.0/5.1. I managed to always return **context** instead of **createConfigurationContext()**, then the SELECT dropdown shows as normal.

---

<div class="post-metadata">

**Author:** ![linl33](https://odkx.b-cdn.net/letter_avatar_proxy/v4/letter/l/b487fb/32.png) [@linl33](https://forum.odk-x.org/u/linl33)\
**Post date:** [March 10, 2021, 2:48pm UTC](https://forum.odk-x.org/t/html-dropdown-does-not-show/1175/5 "2021-03-10T14:48:26Z")

</div>

Thanks for looking into this issue!  
@W_Brunette Do you remember why that was added for 5.0 and 5.1?

For reference this is the commit for that change, [https://github.com/odk-x/androidcommon/pull/97](https://github.com/odk-x/androidcommon/pull/97)

---

<div class="post-metadata">

**Author:** ![W\_Brunette](https://odkx.b-cdn.net/user_avatar/forum.odk-x.org/w_brunette/32/376_2.png) [@W\_Brunette](https://forum.odk-x.org/u/W_Brunette)\
**Post date:** [March 10, 2021, 5:51pm UTC](https://forum.odk-x.org/t/html-dropdown-does-not-show/1175/6 "2021-03-10T17:51:59Z")

</div>

If I remember correctly, it was when we upgraded to 9 and started to change the app-compat libraries to Androidx. This stackoverflow post helped to jog my memory. The post also has an update that the problem in app-compat was fixed in 2020, so the Dec 2020 release probably pulled in this changed behavior.

> <https://stackoverflow.com/questions/41025200/android-view-inflateexception-error-inflating-class-android-webkit-webview>

---

<div class="post-metadata">

**Author:** ![Thien\_Mai](https://odkx.b-cdn.net/user_avatar/forum.odk-x.org/thien_mai/32/375_2.png) [@Thien\_Mai](https://forum.odk-x.org/u/Thien_Mai)\
**Post date:** [March 11, 2021, 7:27am UTC](https://forum.odk-x.org/t/html-dropdown-does-not-show/1175/7 "2021-03-11T07:27:39Z")

</div>

Thanks @W_Brunette.

The trace you give makes the issue much clearer to me. It is not quite an easy fix I guess. Do you have any advice on how to bypass the issue by upgrading something? Or the estimate on when the fix is rolled out?  
I will have to downgrade to ODK Tables 2.1.4 (and ODK Services as well) on android 5 devices. I tested this version and the issue does not happen. Is there any caution that I should take on 2.1.4?

---

<div class="post-metadata">

**Author:** ![W\_Brunette](https://odkx.b-cdn.net/user_avatar/forum.odk-x.org/w_brunette/32/376_2.png) [@W\_Brunette](https://forum.odk-x.org/u/W_Brunette)\
**Post date:** [March 11, 2021, 5:05pm UTC](https://forum.odk-x.org/t/html-dropdown-does-not-show/1175/8 "2021-03-11T17:05:13Z")

</div>

@Thien_Mai. We plan to do a release around the end of March. I think your solution may be correct, but we need to test on other versions. You can help us out by testing your solution on other versions.

---

<div class="post-metadata">

**Author:** ![Thien\_Mai](https://odkx.b-cdn.net/user_avatar/forum.odk-x.org/thien_mai/32/375_2.png) [@Thien\_Mai](https://forum.odk-x.org/u/Thien_Mai)\
**Post date:** [March 12, 2021, 2:37am UTC](https://forum.odk-x.org/t/html-dropdown-does-not-show/1175/9 "2021-03-12T02:37:59Z")

</div>

That’s great. I am happy to test the fix. Thanks.

---

<div class="post-metadata">

**Author:** ![W\_Brunette](https://odkx.b-cdn.net/user_avatar/forum.odk-x.org/w_brunette/32/376_2.png) [@W\_Brunette](https://forum.odk-x.org/u/W_Brunette)\
**Post date:** [March 12, 2021, 8:45pm UTC](https://forum.odk-x.org/t/html-dropdown-does-not-show/1175/10 "2021-03-12T20:45:01Z")

</div>

@Thien_Mai After you test it on other versions feel free to open a pull request against the development branch and I will start testing it as part of the release.

---

<div class="post-metadata">

**Author:** ![Thien\_Mai](https://odkx.b-cdn.net/user_avatar/forum.odk-x.org/thien_mai/32/375_2.png) [@Thien\_Mai](https://forum.odk-x.org/u/Thien_Mai)\
**Post date:** [March 16, 2021, 3:56am UTC](https://forum.odk-x.org/t/html-dropdown-does-not-show/1175/11 "2021-03-16T03:56:16Z")

</div>

@W_Brunette, Unfortunately I am not able to build it, trying many times

> Could not get resource ‘[https://jcenter.bintray.com/org/opendatakit/snapshotBasicAndroidlibrary/maven-metadata.xml](https://jcenter.bintray.com/org/opendatakit/snapshotBasicAndroidlibrary/maven-metadata.xml)’.  
> \> Could not GET ‘[https://jcenter.bintray.com/org/opendatakit/snapshotBasicAndroidlibrary/maven-metadata.xml](https://jcenter.bintray.com/org/opendatakit/snapshotBasicAndroidlibrary/maven-metadata.xml)’. Received status code 500 from server: Internal Server Error

It seems that jcenter is down.

---

<div class="post-metadata">

**Author:** ![W\_Brunette](https://odkx.b-cdn.net/user_avatar/forum.odk-x.org/w_brunette/32/376_2.png) [@W\_Brunette](https://forum.odk-x.org/u/W_Brunette)\
**Post date:** [March 16, 2021, 3:06pm UTC](https://forum.odk-x.org/t/html-dropdown-does-not-show/1175/12 "2021-03-16T15:06:34Z")

</div>

@Thien_Mai, androidlibrary is hosted on a different server: [http://cwe.cs.washington.edu:8082/artifactory/webapp/home.html?](http://cwe.cs.washington.edu:8082/artifactory/webapp/home.html?).

You can check out androidlibrary in your same folder same with androidcommon as services, tables, and survey look first at the same folder first before going to the web.

---

<div class="post-metadata">

**Author:** ![Thien\_Mai](https://odkx.b-cdn.net/user_avatar/forum.odk-x.org/thien_mai/32/375_2.png) [@Thien\_Mai](https://forum.odk-x.org/u/Thien_Mai)\
**Post date:** [March 18, 2021, 10:33am UTC](https://forum.odk-x.org/t/html-dropdown-does-not-show/1175/13 "2021-03-18T10:33:28Z")

</div>

@W_Brunette, I could build the apk and tested. It worked on the device which occurs the issue previously and on all devices I have (android 4, 7, 8, 10).

What was tested: All forms in my real project not crash, dropdown showed perfectly, sync function worked well.

Regarding the pull request, I don’t know how to correctly handle the ticket to get aligned with your project development, so I attach the patch here.

I wanted to completely remove odkContext, but because this is common lib and I could not verify all its dependents, so I had to keep getOdkContext() method, which is not really great.

---

<div class="post-metadata">

**Author:** ![Thien\_Mai](https://odkx.b-cdn.net/user_avatar/forum.odk-x.org/thien_mai/32/375_2.png) [@Thien\_Mai](https://forum.odk-x.org/u/Thien_Mai)\
**Post date:** [March 18, 2021, 10:36am UTC](https://forum.odk-x.org/t/html-dropdown-does-not-show/1175/14 "2021-03-18T10:36:12Z")

</div>

[dropdown-fix.txt](https://forum.odk-x.org/uploads/short-url/eXptic1mGjq3gMmQXW4aSe0nESD.txt) (2.8 KB)  
patch uploaded.

---

<div class="post-metadata">

**Author:** ![W\_Brunette](https://odkx.b-cdn.net/user_avatar/forum.odk-x.org/w_brunette/32/376_2.png) [@W\_Brunette](https://forum.odk-x.org/u/W_Brunette)\
**Post date:** [March 18, 2021, 9:33pm UTC](https://forum.odk-x.org/t/html-dropdown-does-not-show/1175/15 "2021-03-18T21:33:00Z")

</div>

@Thien_Mai can you open a GitHub Pull Request that applies your fix to the _development_ branch of the ODK-X repo?

Pull Requests are the standard way we make changes to ODK-X.

---

<div class="post-metadata">

**Author:** ![Thien\_Mai](https://odkx.b-cdn.net/user_avatar/forum.odk-x.org/thien_mai/32/375_2.png) [@Thien\_Mai](https://forum.odk-x.org/u/Thien_Mai)\
**Post date:** [March 19, 2021, 4:02am UTC](https://forum.odk-x.org/t/html-dropdown-does-not-show/1175/16 "2021-03-19T04:02:55Z")

</div>

A pull request has been raised.

---

<div class="post-metadata">

**Author:** ![W\_Brunette](https://odkx.b-cdn.net/user_avatar/forum.odk-x.org/w_brunette/32/376_2.png) [@W\_Brunette](https://forum.odk-x.org/u/W_Brunette)\
**Post date:** [April 13, 2021, 5:02pm UTC](https://forum.odk-x.org/t/html-dropdown-does-not-show/1175/17 "2021-04-13T17:02:51Z")

</div>

@Thien_Mai the _preview_ release of version 2.1.8 is now available that should fix your issue. Can you give us a try and let us know by end of the week?

> [@Preview Release ODK-X Tool Suite v2.1.8](https://forum.odk-x.org/t/preview-release-odk-x-tool-suite-v2-1-8/1307):
>
> The preview of the upcoming version 2.1.8 release of the ODK-X Tool Suite is now available for testing! Please report any issues or problems [here](https://github.com/opendatakit/tool-suite-X/issues). The v2.1.8 tools are backward compatible with v2.1.\* BUT not backward compatible with previous versions (v2.0.\*). The incompatibility is internal to the ODK-X tools, all external files such as XLSX forms, JavaScript/HTML, and server interfaces are unaffected. Most users should experience a smooth upgrade. Detailed documentation about the ODK-X Tool…

---

<div class="post-metadata">

**Author:** ![Thien\_Mai](https://odkx.b-cdn.net/user_avatar/forum.odk-x.org/thien_mai/32/375_2.png) [@Thien\_Mai](https://forum.odk-x.org/u/Thien_Mai)\
**Post date:** [April 19, 2021, 3:01am UTC](https://forum.odk-x.org/t/html-dropdown-does-not-show/1175/18 "2021-04-19T03:01:43Z")

</div>

Hi @W_Brunette, it works like a charm. Thanks a lot.

---

<div class="post-metadata">

**Author:** ![zogluzop](https://odkx.b-cdn.net/letter_avatar_proxy/v4/letter/z/c4cdca/32.png) [@zogluzop](https://forum.odk-x.org/u/zogluzop)\
**Post date:** [April 24, 2022, 5:11pm UTC](https://forum.odk-x.org/t/html-dropdown-does-not-show/1175/19 "2022-04-24T17:11:39Z")

</div>

what was the exact issue ? how did you resolved it?[.](https://techzpod.com/) [.](https://get-mobdrovip.com)
