Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

ngOptions: always set selected attribute for selected options #14125

Closed
wants to merge 1 commit into from

Conversation

Narretz
Copy link
Contributor

@Narretz Narretz commented Feb 24, 2016

ngOptions wouldn't set the "selected" attribute, if the option was automatically preselected by the browser.

We don't set selected property / attribute on options that are already selected.
That happens for example if the browser has automatically selected the first
option in a select. In that case, the selected property is set automatically, but
the selected attribute is not

Closes angular#14115
@Narretz
Copy link
Contributor Author

Narretz commented Feb 24, 2016

@gkalpak Can you review this? Atm, the test would pass with jqlite without the patch, but it would fail in jquery. I think we can handle the jqlite at a later point, as the issue is quite low impact anyway.

@Narretz Narretz changed the title Fix ngoptions selected ngOptions: always set selected attribute for selected options Feb 24, 2016
@gkalpak
Copy link
Member

gkalpak commented Feb 25, 2016

LGTM

@Narretz Narretz closed this in 2c54a3c Feb 28, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants