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

select/option/repeater issues on IE #235

Closed
IgorMinar opened this issue Jan 15, 2011 · 7 comments
Closed

select/option/repeater issues on IE #235

IgorMinar opened this issue Jan 15, 2011 · 7 comments
Assignees
Milestone

Comments

@IgorMinar
Copy link
Contributor

Confirmed on IE8.

<!doctype html>
<html xmlns:ng="http://angularjs.org">
   <head>
     <script type="text/javascript" src="http://code.angularjs.org/angular-0.9.8.js" ng:autobind></script>
   </head>
   <body ng:init="xs = [1,2,3]; sw = 'a'">

   <ng:switch on="sw">
           <span ng:switch-when="a">
                   <!-- Does not work -->
                   <select name="selector1">
                           <option ng:repeat="v in xs">{{v}}</option>
                   </select>
                   <!-- Works -->
                   <select name="selector2">
                           <option ng:repeat="v in xs" label = "{{v}}"></option>
                   </select>
           </span>
   </ng:switch>
   <!-- Works but select box is larger than expected-->
   <select name="selector3">
           <option ng:repeat="v in xs">{{v}}</option>
   </select>

   </body>
</html>

For "selector1" you will get the options 1, 2 and {{v}} (the last item
will remain unevaluated).
For "selector2" (the "workaround") you will get the options 1, 2 and 3
as expected.
For "selector3" you will get the options 1, 2 and 3 but the select
box is wider. (Enough to fit "{{v}}").

@mhevery
Copy link
Contributor

mhevery commented Jul 6, 2011

is this still applicable or has the ng:options resolved this?

@IgorMinar
Copy link
Contributor Author

No idea. Needs to be tested on IE with ng:options.

@IgorMinar
Copy link
Contributor Author

Apparently this is still an issue in IE (tested in IE9):

Consider the following example (tested in IE 9):
http://jsfiddle.net/MT32U/12/

When a select with ng:options is inside an ng:switch and is populated
dynamically ("selector2") the width is not properly updated.

@ghost ghost assigned mhevery Jul 17, 2011
@mhevery
Copy link
Contributor

mhevery commented Jul 18, 2011

Just tested with ng:options and it seems to work fine, closing.

@mhevery mhevery closed this as completed Jul 18, 2011
@johannesjo
Copy link

Not really working fine with ng-options for me. If I dont use ng-options and insert a select tag manually, scope-values will not be rendered, but instead given out as in the original markup (e.g. {{value}}. It seems to be a rendering step behind in all IEs lower than 10. Also the array or object passed to the select does not get updated instantly, but only if the select ist actually clicked on.

@ghost
Copy link

ghost commented Mar 19, 2013

ng-options_on_ie_8

IE8 still shows an empty item in the list box when using ng-options (see screenshot)

$scope.modes = [ {
id : 1,
name : "view calendar"
}, {
id : 2,
name : "adjust schedule"
}, {
id : 3,
name : "update line A"
}, {
id : 4,
name : "update line B"
}, ];
$scope.selectedMode = $scope.modes[0];

I'm on IE9 using IE8 standards via jersey header("X-UA-Compatible", "IE=8")

@shidhincr
Copy link

Is this issue related to this one ?

http://jsbin.com/oqeNUdU/2/edit

Still happening in IE8

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants