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

fix(select): force visual update in IE #8158

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/ng/directive/select.js
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,12 @@ var selectDirective = ['$compile', '$parse', function($compile, $parse) {
// lastElement.prop('selected') provided by jQuery has side-effects
if (existingOption.selected !== option.selected) {
lastElement.prop('selected', (existingOption.selected = option.selected));
if (msie) {
// See #7692
// The selected item wouldn't visually update on IE without this.
// Tested on Win7: IE9, IE10 and IE11. Future IEs should be tested as well
lastElement.prop('selected', existingOption.selected);
}
}
} else {
// grow elements
Expand Down