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

Regression: cannot select the last option in <select> with ng-options #10161

Closed
BenoitBorlee opened this issue Nov 21, 2014 · 8 comments
Closed

Comments

@BenoitBorlee
Copy link

I have a select directive with ng-options on a simple array of strings :

<select ng-model="formData.mySelect" ng-options="o for o in ['A','B','C']"></select>

With angularjs 1.2.27, I cannot select the last option ('C') the first time. I can only select other entries.

Reproduced here :
http://jsbin.com/pahujutico/1/watch?html,js,output
Steps :

  • Select the 'C' option of the selection box at first.
  • Please note that 'C' is NOT displayed.
  • Select the 'A' option of the selection box.
  • Please note that 'A' is displayed.

It works well with angularjs 1.2.25.

@lgalfaso
Copy link
Contributor

it looks like a real bug, let me see if it is possible to fix this quickly

@lgalfaso
Copy link
Contributor

it looks like this is an actual issue even on 1.3. #10166 is tracking the fix for 1.3, once this landed I will back port the fix to 1.2

@pkozlowski-opensource
Copy link
Member

@lgalfaso looks like #10166 landed already. Do you need a hand with back-porting it to 1.2.x?

@pkozlowski-opensource pkozlowski-opensource modified the milestones: 1.3.5, 1.3.6 Dec 1, 2014
@Narretz Narretz modified the milestones: Ice Box, 1.3.6 Dec 1, 2014
@Narretz
Copy link
Contributor

Narretz commented Dec 1, 2014

Is it sensible to track the backport to 1.2 under the 1.3.x milestones? Should we have another milestone that tracks 1.2.x issues?

@pkozlowski-opensource
Copy link
Member

@Narretz if this is cherry-pickable to 1.2.x than we should do it IMO

@guilbep
Copy link
Contributor

guilbep commented Dec 12, 2014

Seems like the same as #10213

@petebacondarwin
Copy link
Contributor

This is also fixed by #10639 - see http://jsbin.com/zejihedovi/1/edit?html,js,output

@petebacondarwin
Copy link
Contributor

We are not going to backport this to 1.2.x since that branch is only receiving security fixes now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants