datalist-polyfill
datalist-polyfill copied to clipboard
Spaces are missing
I have spaces in my datalist.
option1
option2
option3
option4
It shows like this with polyfill.
option1
option2
option3
option4
Maybe convert spaces to
@jenstornell thanks a lot for your feedback.
When comparing this either to <option>
elements in simple, regular <select>
element, and even regarding the rendering of <option>
items in an <input>
elements ´
So quick question back: Are you expecting the rendering of those spacings by observations of regular behaviour in browsers that I'm missing? Or is it out of your "own" expectations?
Here is my code:
<datalist id="search_places">
<option value="Kalmar län"></option>
<option value=" Mörbylånga"></option>
<option value=" Kalmar"></option>
<option value=" Västervik"></option>
<option value=" Vimmerby"></option>
<option value=" Borgholm"></option>
</datalist>
Chrome
Edge
Firefox (polyfill)
All browsers look a bit different, but Firefox is the only one not prefixing options with spaces.