This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Commit f40f54c
2 files changed
+28
-1
lines changedLines changed: 7 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
394 | 394 |
| |
395 | 395 |
| |
396 | 396 |
| |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
397 | 403 |
| |
398 | 404 |
| |
399 | 405 |
| |
| |||
531 | 537 |
| |
532 | 538 |
| |
533 | 539 |
| |
534 |
| - | |
| 540 | + | |
535 | 541 |
Code has comments. Press enter to view. | |
536 | 542 |
| |
537 | 543 |
| |
|
Lines changed: 21 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
733 | 733 |
| |
734 | 734 |
| |
735 | 735 |
| |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
736 | 757 |
| |
737 | 758 |
| |
738 | 759 |
| |
|
3 commit comments
revolunet commentedon Jun 16, 2014
Sorry but i don't really understand that test, maybe you can help me understand better
option.property
of a non-selected optionas angular rewrites all the properties based on the model value during digest, for me its legit that a non-selected option (B) (based on the model value) doesn't keep the selected property, nope ?
looks like this change introduces a bug in a special case on some browsers (iOS, IE) : when we have an ngModel that doesnt belong to ngOptions, angular adds an empty option, that is removed on selection. that changes introduces a shift in the index and thus the displayed value is not the selected one. the model value, though is OK
Here's an example you can try on iOS/IE : http://run.plnkr.co/plunks/xS3sDPIv7DnuxqA8A5bI/
Any idea ?
caitp commentedon Jun 16, 2014
@revolunet your issue that you bring up is a known issue, someone has been working on a fix for it but it's not clear that they've ever submitted it yet, if you want to try and work on that. It isn't super high priority at the moment, but we'd like to get that fixed.
However, and this is important,
ng-model
throws a wrench into the whole "model -> view" thing. Withng-model
, we're basically saying that the view / user interactions have the ability to change the model, and different browsers do this sort of differently forselect
controls. IE, before this patch was checked in, we had some issues on firefox, now after this patch is checked in, we have some issues on IE/iOS. Ideally, we don't have any of those issues. The web makes this hard, but that's what we're going for here. But yeah, the model does need to update to reflect changes to the selected state of options.Anyways, if you are interested in working on a fix for the IE/iOS issue, that would be awesome
revolunet commentedon Jun 16, 2014
thanks fo the feedback, i'm working on it, trying to sort out the select directive code which is not very easily readable :)
IMHO this issue should be a priority as a simple combination of an invalid ngModel (eg: empty value) with ngOptions is buggy on IE and all iOS which is quite a lot of browsers :/