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

refactor(select): make MSIE behaviour consistent with other browsers #10044

Closed
wants to merge 3 commits into from

Conversation

caitp
Copy link
Contributor

@caitp caitp commented Nov 13, 2014

Revisit #10042 to test suspicions

petebacondarwin and others added 3 commits November 13, 2014 10:43
…tion` matcher

By using a new matcher our tests become less brittle with respect to unimportant
extra attributes.
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
Copy link
Contributor Author

caitp commented Nov 13, 2014

@petebacondarwin I'd rather we used an arrangement more like this just so the behaviour is for sure consistent --- at the very least we need to run the test for both IE and not. I'm still not positive this solves the underlying issue, but since your test commit was first I'm guessing it works, so LGTM if it's changed to work for non-IE too.

@caitp caitp closed this Nov 13, 2014
@petebacondarwin
Copy link
Contributor

@caitp - The only reason I didn't do this for all browsers is that it is not needed and adds further DOM manipulation overhead for all the other browsers.

As you demonstrate the fix works on all browsers but with non-IE it works without. So effectively it is an optimization to leave it out.

Interestingly, we could in fact ditch using text and use label exclusively, since this is what the browsers read anyway - if not defined label falls back on text. So if we did that it would be consistent across browsers but I was wondering if people rely on the option's text being updated?

What do you think?

@caitp
Copy link
Contributor Author

caitp commented Nov 13, 2014

I'm not too worried about the perf, the perf is going to suck no matter what we do for large selects, and is going to be irrelevant no matter what we do for normal ones. I would prefer to not have behaviour change across browsers unless it's absolutely necessary.

You could always just enable the test on all browsers instead and leave the fix as-is if you're that concerned about the overhead, but it's not going to make a huge difference

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

Successfully merging this pull request may close these issues.

2 participants