diff --git a/app/lib/angular/angular.js b/app/lib/angular/angular.js index 6d4465e3..9f928182 100644 --- a/app/lib/angular/angular.js +++ b/app/lib/angular/angular.js @@ -14084,7 +14084,7 @@ var selectDirective = ['$compile', '$parse', function($compile, $parse) { var lastView; ctrl.$render = function() { var items = new HashMap(ctrl.$viewValue); - forEach(selectElement.children(), function(option) { + forEach(selectElement.find('option'), function(option) { option.selected = isDefined(items.get(option.value)); }); }; @@ -14101,16 +14101,10 @@ var selectDirective = ['$compile', '$parse', function($compile, $parse) { selectElement.bind('change', function() { scope.$apply(function() { var array = []; - function addIfSelected(option) { + forEach(selectElement.find('option'), function(option) { if (option.selected) { array.push(option.value); } - } - forEach(selectElement.children(), function(child) { - if (child.tagName == 'OPTION') - addIfSelected(child); - else if (child.tagName == 'OPTGROUP') - forEach(child.getElementsByTagName('option'), addIfSelected); }); ctrl.$setViewValue(array); });