Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

Dropdown/select box "selected" attribute isn't acknowledged #16

Closed
bridgeport opened this issue Dec 23, 2017 · 1 comment
Closed

Dropdown/select box "selected" attribute isn't acknowledged #16

bridgeport opened this issue Dec 23, 2017 · 1 comment

Comments

@bridgeport
Copy link

bridgeport commented Dec 23, 2017

First off, thanks for putting together this script.

Unlike inputs and textareas, if a select box has a predefined/initial selected="selected" option, float-labels doesn't activate for that field.

For example, the following will show "United States" styled as a a grayed out placeholder without any floating label:

<label for="country">Country</label>
<select id="country">
    <option>Country</option>
    <option value="CA">Canada</option>
    <option value="US" selected>United States</option>
</select>
@pryley
Copy link
Owner

pryley commented Dec 25, 2017

I am only able to reproduce this issue when a form is reset, is this also true for you?

If it is not isolated to the form reset event in your project, then it could also be due to a conflict. If this is the case, you may want to download and edit the index.html file directly in the repository, then add the example field to the form and test it.

pryley added a commit that referenced this issue Jan 7, 2018
@pryley pryley closed this as completed Jan 7, 2018
pryley added a commit that referenced this issue Jan 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants