forked from angular/angular.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ng:options): compile null/blank option tag, select correct elemen…
…t in the view when unknown option is present Closes angular#562, angular#599
- Loading branch information
Showing
1 changed file
with
1 addition
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
existingOption
was taken from cache (optionGroupsCache
). When user switches selection to something else, theexistingOption.element.selected
is changed, butexistingOption.selected
is not.It worked well if there was no '?' element in
optionGroups
(added on line 343). When added, it causedexistingOptions
andoptionGroups
to grow. When user switched from '?' to something else, theoptionGroups
was shrinked by 1 element, butexistingOptions
was not. The compiler started replacing labels and ids in<option>
tags, but the selection was not updated.Jeez. This commit was like 8 symbols, but the explanation and debugging took sooo long :)