iPhone: ng-options selects next element first time #5132
Description
Description: a select with ng-options
that generates a empty first element will select the element next to the one that the user selected.
Angular Version(s): Tested on 1.2.2. Doesn't seem to be a regression since I was able to verify the same issue in 1.1.1 and 1.2.0-rc3.
Browsers and Operating System: iOS7 (iPhone), tested with Safari and Chrome, latest versions.
Reproducing the error:
- Browse this URL: http://jsfiddle.net/MTfRD/537/embedded/result/
- Select "Feature" (first element)
- Observe that the selected value in the select box is now "Bug" (second element).
Workaround:
http://jsfiddle.net/MTfRD/3/embedded/result/
Has the exact same configuration as the example that reproduces the error, except that a first element is forced in the select box.
(Code adapted from: http://stackoverflow.com/questions/12654631/why-does-angularjs-include-an-empty-option-in-select)
Related issues: Not that I'm aware of. Investigating this I arrived to this issue, but I cannot tell if they are actually related or not.