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")
,
Apr 26 2016
,
Apr 26 2016
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.
,
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 :)
,
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.
,
Apr 26 2016
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
,
Apr 26 2016
Oops, bot is too slow and doesn't notice I already replied ;)
,
Apr 28 2016
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.
,
Apr 28 2016
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 |
|||||
Comment 1 by torne@chromium.org
, Apr 26 2016