Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spaces are missing #84

Open
jenstornell opened this issue Sep 15, 2020 · 2 comments
Open

Spaces are missing #84

jenstornell opened this issue Sep 15, 2020 · 2 comments

Comments

@jenstornell
Copy link

I have spaces in my datalist.

option1
    option2
    option3
option4

It shows like this with polyfill.

option1
option2
option3
option4

Maybe convert spaces to  

@mfranzke
Copy link
Owner

@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 ´` "dropdown", the spaces are ignored by the browsers as well.

image
image

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?

@jenstornell
Copy link
Author

jenstornell commented Sep 18, 2020

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

chrome

Edge

edge

Firefox (polyfill)

firefox

All browsers look a bit different, but Firefox is the only one not prefixing options with spaces.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants