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.

Version 1.2.15 broke functionality with select and ng-options #7855

Closed

Description

@dnchristiansen

We have some functionality where it's possible that after a select is changed, the model could end up back at the same value it was before. This worked fine up to version 1.2.14. See this fiddle: http://jsfiddle.net/k8EaA/
As the select is changed, the select shows the correct model ('c') after it is changed.

See this fiddle with version 1.2.15: http://jsfiddle.net/kdG38/
As the select is changed, it stays on what it was changed to, and doesn't reflect what's in the model.

We also have some functionality that removes certain options in certain cases. Basically, we have a few selects that all have the same options, and then don't allow the same option to be selected for the other selects. We do this by removing options that are already selected in the other selects.
This issue only seems to be a problem in IE11. In IE11, view this fiddle with version 1.2.14: http://jsfiddle.net/uLUXP/
Change the last select to AAA. All the other selects show the correct value based on the model.

See this fiddle with version 1.2.15: http://jsfiddle.net/S37Yp/
Change the last select to AAA. All the other selects now show the first option, which does not match the model.

It seems very likely that this behavior was introduced with this commit: dc149de
I tried reverting those changes locally, and then the selects work as expected.

I tried all this with the latest 1.2.18 version, and these issues still exist.

Activity

  1. andhernand commented on Jun 17, 2014

    @andhernand

    I have also seen the same behavior. See this fiddle: http://jsfiddle.net/andhernand/hLNF2/10/

    The effects are heightened in Chrome on Android.

  2. lgalfaso commented on Jun 17, 2014

    @lgalfaso
    Contributor

    Hi,
    Can you check is this still an issue with #7136 ?

  3. andhernand commented on Jun 17, 2014

    @andhernand

    The above patch does not fix the problem. I am seeing the same behavior with the patch applied.

  4. dnchristiansen commented on Jun 17, 2014

    @dnchristiansen
    Author

    With that patch, I still have both the issues mentioned above.

  5. added this to the 1.3.0-beta.14 milestone on Jun 20, 2014
  6. self-assigned this
    on Jun 23, 2014
  7. jeffbcross commented on Jul 1, 2014

    @jeffbcross
    Contributor

    @dnchristiansen I'm having trouble understanding the real-world use case for your first issue, where you would want to always change the value back to a hard-coded value after the user has changed the input. Can you describe a situation where you would want to do this, and what you're expecting Angular to do differently?

  8. 19 remaining items

  9. Narretz commented on Jul 31, 2014

    @Narretz
    Contributor

    @dnchristiansen
    There's a fix (cdc7db3) in master that also fixes both regressions you posted:

    http://jsfiddle.net/k8EaA/1/
    http://jsfiddle.net/S37Yp/1/

    Can you confirm that your issues are fixed with that?

  10. dnchristiansen commented on Jul 31, 2014

    @dnchristiansen
    Author

    I tried my app with this commit and the 1st issue is resolved.

    I am still having some issues in my app with the 2nd issue, but the fiddle is obviously working. As the 2nd issue only happens in IE11, the 1st issue is higher priority for us. I don't have a problem with this issue being closed, and then I'll see if I can create a fiddle that shows the problem we still have in IE11. If I'm able to do that, I'll just open a new issue.

    Is it safe to assume this commit will make its way into the v1.2.x branch?

  11. caitp commented on Jul 31, 2014

    @caitp
    Contributor

    The commit which broke it has already been reverted in v1.2.x (I think it was actually a pair of commits, so hopefully both were reverted)

  12. dnchristiansen commented on Jul 31, 2014

    @dnchristiansen
    Author

    Are those v1.2.x commits in a released version? Or will they be included in the next 1.2.x version?

  13. caitp commented on Jul 31, 2014

    @caitp
    Contributor

    they'll be released on monday I believe

  14. dnchristiansen commented on Aug 11, 2014

    @dnchristiansen
    Author

    As I am using the 1.2.x versions of angular, I wanted to confirm this issue was fixed with the next released version. However, the fiddles above with the latest code have definitely fixed the issue, so I will close this issue for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions