Skip to content

Commit cbc86ea

Browse files
committed
fix(select): remove workaround for Chrome bug
In the Chrome issue (https://bugs.chromium.org/p/chromium/issues/detail?id=381459) I noticed that the bug can't be reproduced in Chrome 45 and the issue was closed subsequently. I've also tested again with Chrome 51 and it still works. Related: angular#6828
1 parent a478f69 commit cbc86ea

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

src/ng/directive/select.js

-10
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,6 @@
22

33
var noopNgModelController = { $setViewValue: noop, $render: noop };
44

5-
function chromeHack(optionElement) {
6-
// Workaround for https://code.google.com/p/chromium/issues/detail?id=381459
7-
// Adding an <option selected="selected"> element to a <select required="required"> should
8-
// automatically select the new element
9-
if (optionElement[0].hasAttribute('selected')) {
10-
optionElement[0].selected = true;
11-
}
12-
}
13-
145
/**
156
* @ngdoc type
167
* @name select.SelectController
@@ -90,7 +81,6 @@ var SelectController =
9081
var count = optionsMap.get(value) || 0;
9182
optionsMap.put(value, count + 1);
9283
self.ngModelCtrl.$render();
93-
chromeHack(element);
9484
};
9585

9686
// Tell the select control that an option, with the given value, has been removed

0 commit comments

Comments
 (0)