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

Select first option by default #21

Open
orslumen opened this issue Apr 8, 2011 · 0 comments
Open

Select first option by default #21

orslumen opened this issue Apr 8, 2011 · 0 comments

Comments

@orslumen
Copy link

orslumen commented Apr 8, 2011

When selectedIndex is requested for the first time, I think it is best to select the first item in the dropdown if nothing was selected and an option is available.

I did not verify that this is according to specs, but at least FF, IE, Safari and Chrome will never return null in case an option is available.

One way to fix this can be found in orslumen@18d271d

But it is probably more correct to select the first option once the HTML is parsed and no options have been marked as selected yet.

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

1 participant