|
5 | 5 | var noopNgModelController = { $setViewValue: noop, $render: noop };
|
6 | 6 |
|
7 | 7 | function setOptionSelectedStatus(optionEl, value) {
|
8 |
| - optionEl.prop('selected', value); // needed for IE |
| 8 | + optionEl.prop('selected', value); |
9 | 9 | /**
|
10 | 10 | * When unselecting an option, setting the property to null / false should be enough
|
11 | 11 | * However, screenreaders might react to the selected attribute instead, see
|
@@ -40,6 +40,7 @@ var SelectController =
|
40 | 40 | // does not match any of the options. When it is rendered the value of the unknown
|
41 | 41 | // option is '? XXX ?' where XXX is the hashKey of the value that is not known.
|
42 | 42 | //
|
| 43 | + // Support: IE 9 only |
43 | 44 | // We can't just jqLite('<option>') since jqLite is not smart enough
|
44 | 45 | // to create it in <select> and IE barfs otherwise.
|
45 | 46 | self.unknownOption = jqLite(window.document.createElement('option'));
|
@@ -620,10 +621,11 @@ var selectDirective = function() {
|
620 | 621 | includes(value, selectCtrl.selectValueMap[option.value]));
|
621 | 622 | var currentlySelected = option.selected;
|
622 | 623 |
|
623 |
| - // IE and Edge, adding options to the selection via shift+click/UP/DOWN, |
| 624 | + // Support: IE 9-11 only, Edge 12-15+ |
| 625 | + // In IE and Edge adding options to the selection via shift+click/UP/DOWN |
624 | 626 | // will de-select already selected options if "selected" on those options was set
|
625 | 627 | // more than once (i.e. when the options were already selected)
|
626 |
| - // So we only modify the selected property if neccessary. |
| 628 | + // So we only modify the selected property if necessary. |
627 | 629 | // Note: this behavior cannot be replicated via unit tests because it only shows in the
|
628 | 630 | // actual user interface.
|
629 | 631 | if (shouldBeSelected !== currentlySelected) {
|
|
0 commit comments