Some datalists are not viewed properly. Only the initial value of the input is proposed in the datalist.Where is my fault ?
I generate with php and data from Amazon, Google and French BnF (National Library) some datalists so that the user may choose his proper information. It works most of the time (95%). But I get issues with some datalists. Only one option is viewed, the initial value of the input.
Code 1:
<input id="author" name="item_author" value="Sophie de Ségur" onchange="javascript:submit();" list="data_author">
<datalist id="data_author">
<option value="Comtesse de Ségur">Amazon</option>
<option value="Comtesse de Ségur">BnF</option>
<option value="Sophie Rostopchine de Ségur">Google</option>
<option value="Sophie de Ségur">BnF</option>
<option value=" Bertall">BnF</option>
</datalist>
Result code 1: Only fourth option viewed (initial value of input).
Example 2:
<input id="author" name="item_author" value="Catherine Ard" onchange="javascript:submit();" list="data_author">
<datalist id="data_author">
<option value="Mickael Wiles">Amazon</option>
<option value="[textes par Catherine Ard]">BnF</option>
<option value="Catherine Ard">BnF</option>
</datalist>
Result code 2: Only last option viewed (initial value of input)
Example 3:
<input id="publisher" name="item_publisher" value="Gallimard jeunesse" onchange="javascript:submit();" list="data_publisher">
<datalist id="data_publisher">
<option value="Editions Gallimard">Amazon</option>
<option value="Gallimard jeunesse">BnF</option>
</datalist>
result code 3: Only last option viewed (initial value of input)
In all 3 examples, when I click on the arrow at the right of the input (on chrome), I expect to get a menu with all options. But I get only the option that is the value of the input.