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

Commit 4e1713b

Browse files
committed
fix(ngOptions): fix frozen ui in ie with more than one select[multiple]
If there is more than one select next to each other, and the first select is wrappend in an element with display: inline or display: inline-block, all but the last select are completely unresponsive to any user input. This cannot be tested in a unit-test or e2e test. Closes #11314 Closes #11795
1 parent 9e83b83 commit 4e1713b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/ng/directive/ngOptions.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -576,11 +576,15 @@ var ngOptionsDirective = ['$compile', '$parse', function($compile, $parse) {
576576
function updateOptionElement(option, element) {
577577
option.element = element;
578578
element.disabled = option.disabled;
579-
if (option.value !== element.value) element.value = option.selectValue;
579+
// IE bug: The label must be set before the value, otherwise
580+
// IE10/11 will freeze multiple selects in certain circumstances,
581+
// see https://github.com/angular/angular.js/pull/11795
582+
// This is unfortunately untestable with unit / e2e tests
580583
if (option.label !== element.label) {
581584
element.label = option.label;
582585
element.textContent = option.label;
583586
}
587+
if (option.value !== element.value) element.value = option.selectValue;
584588
}
585589

586590
function addOrReuseElement(parent, current, type, templateElement) {

0 commit comments

Comments
 (0)