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

Commit fd29c12

Browse files
committed
...
1 parent ad9da9c commit fd29c12

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/ng/directive/ngOptions.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -474,14 +474,14 @@ var ngOptionsDirective = ['$compile', '$document', '$parse', function($compile,
474474
// Otherwise, screen readers might get confused
475475
if (selectedOption) {
476476
selectedOption.element.removeAttribute('selected');
477-
jqLite(selectedOption.element).prop('selected', false); // IE9
477+
// jqLite(selectedOption.element).prop('selected', false); // IE9
478478
// jqLite(selectedOption.element).removeAttr('selected'); // IE9
479479
}
480480

481481
if (option) {
482482
if (providedEmptyOption) {
483483
emptyOption.removeAttr('selected');
484-
emptyOption.prop('selected', false); // IE9
484+
// emptyOption.prop('selected', false); // IE9
485485
}
486486
// Don't update the option when it is already selected.
487487
// For example, the browser will select the first option by default. In that case,

test/ng/directive/ngOptionsSpec.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -754,20 +754,18 @@ describe('ngOptions', function() {
754754

755755
var options = element.find('option');
756756
expect(options[0].getAttribute('selected')).toBe('selected');
757-
console.log('1', options[1].hasAttribute('selected'));
758757
expect(options[1].hasAttribute('selected')).toBe(false);
759-
console.log('2', options[2].hasAttribute('selected'));
760758
expect(options[2].hasAttribute('selected')).toBe(false);
761759

762-
return;
763-
764760
scope.selected = scope.values[0];
765761
scope.$digest();
766762

767763
expect(options[0].hasAttribute('selected')).toBe(false);
768764
expect(options[1].getAttribute('selected')).toBe('selected');
769765
expect(options[2].hasAttribute('selected')).toBe(false);
770766

767+
return;
768+
771769
scope.selected = scope.values[1];
772770
scope.$digest();
773771

0 commit comments

Comments
 (0)