'HTML datalist is not working since Android 8 or higher in WebView
HTML datalist element is not working since Android 8 in Chrome WebView (Hybrid Apps). However, it's working with previous Android versions.
Problem
If I try to open or type in an HTML datalist nothing happens. It behaves like an HTML input. So, you cannot list your options, search or autocomplete. The popup doesn't show up as well.
How to reproduce it?
Add this to a default Cordova/Phonegap/Ionic example and open it on Android 8 or higher.
<label for="ice-cream-choice">Choose a flavor:</label>
<input list="ice-cream-flavors" id="ice-cream-choice" name="ice-cream-choice" />
<datalist id="ice-cream-flavors">
<option value="Chocolate">
<option value="Coconut">
<option value="Mint">
<option value="Strawberry">
<option value="Vanilla">
</datalist>
Tested
- Huawei P7 L10 with Android 5 (working)
- BQ Aquaris U Lite with Android 7 (working)
- Samsung Galaxy A5 2017 with Android 8 (not working)
- Xiaomi Mi Redmi Note 6 Pro with Android 8 (not working)
- Xiaomi Mi A1 (Android One) with Android 9 (not working)
I use this Chrome version (WebView)
"Mozilla/5.0 (Linux; Android 8.0.0; SM-A520F Build/R16NW; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/73.0.3683.90 Mobile Safari/537.36"
Question
Is there any configuration on Android 8 or higher to make datalist works again?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|