|
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')); |
@@ -625,10 +626,11 @@ var selectDirective = function() { |
625 | 626 | includes(value, selectCtrl.selectValueMap[option.value])); |
626 | 627 | var currentlySelected = option.selected; |
627 | 628 |
|
628 | | - // IE and Edge, adding options to the selection via shift+click/UP/DOWN, |
| 629 | + // Support: IE 9-11 only, Edge 12-15+ |
| 630 | + // In IE and Edge adding options to the selection via shift+click/UP/DOWN |
629 | 631 | // will de-select already selected options if "selected" on those options was set |
630 | 632 | // more than once (i.e. when the options were already selected) |
631 | | - // So we only modify the selected property if neccessary. |
| 633 | + // So we only modify the selected property if necessary. |
632 | 634 | // Note: this behavior cannot be replicated via unit tests because it only shows in the |
633 | 635 | // actual user interface. |
634 | 636 | if (shouldBeSelected !== currentlySelected) { |
|
0 commit comments