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

iPhone: ng-options selects next element first time #5132

Closed
@AlphaGit

Description

@AlphaGit

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:

  1. Browse this URL: http://jsfiddle.net/MTfRD/537/embedded/result/
  2. Select "Feature" (first element)
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions