When creating the select in angularjs, I have not given any selected value 
initially so a blank option is shown initially. As soon as user selects any 
option, the blank option is auto removed by browsers and the selected 
option is displayed correctly. But Safari 7.1 is not able to do so. In 
Safari 7.1 if a user selects any other option say option number 3, the 
select will remove the blank option and display option number 2 as selected 
instead of option number 3. The user is raising concern over it as he 
intended to choose option 3 but browser is showing option 2.


My Code is: HTML:

<div ng-controller="MyCtrl"> <select ng-model="form.type" 
ng-change="alphabetClicked(selectedAlbhabet)" ng-options="option.value as 
option.name for option in typeOptions" > </select> form.type={{form.type}} 
</div>

JavaScript:
var myApp = angular.module('myApp',[]); function MyCtrl($scope) { 
$scope.typeOptions = [ { name: 'Feature', value: 'feature' }, { name: 'Bug', 
value: 'bug' }, { name: 'Enhancement', value: 'enhancement' } ]; //$scope.form 
= {type : $scope.typeOptions[0].value}; }

jsfiddle: http://jsfiddle.net/4qKyx/176/

My question: what workaround should I use so that on selecting any option 
in select, Safari 7.1 also displays the intended selected option.

*Note:* I am ok with the first option as being blank as it means user needs 
to select some option and currently nothing is selected by the user. Once 
user makes a choice I am also ok with auto removal of blank option.

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to