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

IE (8-10) rendering issue when dynamically changing options #9621

Closed
dnchristiansen opened this issue Oct 14, 2014 · 4 comments
Closed

IE (8-10) rendering issue when dynamically changing options #9621

dnchristiansen opened this issue Oct 14, 2014 · 4 comments

Comments

@dnchristiansen
Copy link

I have a set of selects that all have the same options. Then I run those options through a filter so that any options that are selected in a different select don't show up in the select. Basically I'm preventing the same option from being selected multiple times among the selects.

Here is a fiddle with 1.3.0: http://jsfiddle.net/pzy8s22q/

In IE8 - 10, if you change 3rd select from FFF to AAA, the two dropdowns before it show a different value than what is in the model.

if it helps at all, I posted this StackOverflow question back in the early days of Angular when I first ran into this: http://stackoverflow.com/questions/12942681/how-to-fix-ie-select-issue-when-dynamically-changing-options

I mentioned some of these details in issue #4749 but it has since been closed. There was a comment there with a suggested fix that fixed the issue for me: #4749 (comment)

Any reason the lines
lastElement.attr('label', existingOption.label);
and
element.attr('label', option.label);

couldn't be added where mentioned in the comment?

@petebacondarwin
Copy link
Contributor

I think this is the right thing to do but rather than always adding labels to all the option elements, we should only do it for IE. What do you think?

petebacondarwin added a commit to petebacondarwin/angular.js that referenced this issue Nov 13, 2014
Only changing the `<option>` text value is not enough to trigger a render
change in IE. We need to explicit update the `label` attribute too.

Closes angular#9621
petebacondarwin added a commit to petebacondarwin/angular.js that referenced this issue Nov 13, 2014
Only changing the `<option>` text value is not enough to trigger a render
change in IE. We need to explicit update the `label` attribute too.

Closes angular#9621
caitp pushed a commit to caitp/angular.js that referenced this issue Nov 13, 2014
Only changing the `<option>` text value is not enough to trigger a render
change in IE. We need to explicit update the `label` attribute too.

Closes angular#9621
@dnchristiansen
Copy link
Author

I'm very pleased to see a fix for this in the works. Is there any possibility this will end up in the 1.2.x branch? Or is 1.2.26 going to be the final version of 1.2 with no future updates?

@petebacondarwin
Copy link
Contributor

Possibly could go into 1.2.27 but we will see what the final fix is.

petebacondarwin added a commit to petebacondarwin/angular.js that referenced this issue Nov 13, 2014
Only changing the `<option>` text value is not enough to trigger a render
change in IE. We need to explicit update the `label` property too.

Closes angular#9621
petebacondarwin added a commit to petebacondarwin/angular.js that referenced this issue Nov 14, 2014
Only changing the `<option>` text value is not enough to trigger a render
change in IE. We need to explicit update the `label` property too.

Closes angular#9621
petebacondarwin added a commit that referenced this issue Nov 15, 2014
Only changing the `<option>` text value is not enough to trigger a render
change in IE. We need to explicit update the `label` property too.

Closes #9621
Closes #10042
@dnchristiansen
Copy link
Author

Now that this fix is in the released 1.3.3 version, is there any chance of it going into the 1.2.x branch? We've had this problem since the 1.0.x versions of angular and we're stuck having to support IE8. It seems like small, low-impact fixes like this could be cherry-picked back into 1.2.x pretty easily.

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