New issue
Advanced search Search tips

Issue 606677 link

Starred by 3 users

Issue metadata

Status: WontFix
Owner:
Closed: Apr 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

Datalist element display empty options list in webview 37

Reported by louis.co...@gmail.com, Apr 26 2016

Issue description

Hi,
Html5 element datalist works fine in the browser on my android 5 device but when used in a cordova packaged application it shows an empty suggestions list. (see attached files)
Also, the same cordova application seems to works on android 4.2.

Device name: AVD emulator 
Android version: 5.0.1 (API lvl 21)
WebView version : 37.0.0
Application: A cordova app to reproduce the issue
Application version:

URLs (if applicable): 



Steps to reproduce:
I created a single page application with cordova containing:

 <input list="browsers" name="browser">
  <datalist id="browsers">
    <option value="Internet Explorer">
    <option value="Firefox">
    <option value="Chrome">
    <option value="Opera">
    <option value="Safari">
  </datalist>
  <input type="submit">

Expected result:
Typing "Fir" should suggests the "Firefox" option.

Actual result:
See attached file, suggestions list is shown but it is a blank list (if you click inside this blank list, it does select "Firefox")

 
datalist-issue1.PNG
40.8 KB View Download

Comment 1 by torne@chromium.org, Apr 26 2016

Does this work on current versions of WebView on a real device? (currently, version 50)?

If so then this is probably an old bug in the implementation that we fixed, and the only way this will be fixed is for you to use a newer WebView version. We don't currently release apk updates suitable for the emulator though, so you'd have to just use a newer emulator OS image :/

Comment 2 by torne@chromium.org, Apr 26 2016

Labels: Needs-Feedback
Yes, I reproduce it on a real device android 5.1, but on newer version datalist works as expected.

Ok, I was expecting a workaround (it is said as supported on caniuse.com for these android versions), I'll use custom js.

Thanks.
Louis.

Comment 4 by torne@chromium.org, Apr 26 2016

Can you reproduce it with the latest WebView update installed from the Play Store? Real devices with 5.0 or later get WebView updates without needing the OS to be updated - testing using the preinstalled WebView version isn't very useful as only a tiny proportion of users (a few percent) don't have some updated version.

If you can reproduce this bug using the *latest* play store webview on any Android 5.x and up device then that would be an actual bug we need to fix, but if it's only broken on outdated webview versions then we've already fixed it :)

Comment 5 by torne@chromium.org, Apr 26 2016

Also, while I'm not sure about the specific cause of this problem, usually when we see problems with popup windows (this is a popup window, even though it may not look like it) this is because the app is creating WebView using an Application context instead of an Activity context. We try to make sure that using an Application context does work in general, but Android strongly discourages this and it's not really "proper" usage. I don't know what Cordova does, but if it's passing the app to the WebView constructor then making it pass the activity instead will probably fix the bug on all versions of android/webview.
Project Member

Comment 6 by sheriffbot@chromium.org, Apr 26 2016

Labels: -Needs-Feedback Needs-Review
Owner: torne@chromium.org
Thank you for providing more feedback. Adding requester "torne@chromium.org" for another review and adding "Needs-Review" label for tracking.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 7 by torne@chromium.org, Apr 26 2016

Labels: -Needs-Review Needs-Feedback
Oops, bot is too slow and doesn't notice I already replied ;)
I finally found a Nexus 4 with Android 5.1 to test with the last webview version. I installed my "datalist for test" app and I still had the issue (the webview was 39.0.0) 

I went to the play store and updated the webview and now it works !

I don't know if it is acceptable to tell the user that they have to update the system webview to use our app. 
Can't we tell to the device that our app depends on the android webview version X and let him trigger the update if it's needed.

Anyway, thanks for the support :)
Have a good day.

Comment 9 by torne@chromium.org, Apr 28 2016

Status: WontFix (was: Unconfirmed)
Almost all users already have a recent webview update installed. It updates automatically by default.

There's no way to express dependencies between packages in Android, unfortunately.

Sign in to add a comment