This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
Created "null" option into select ng-options sets to false when other option is clicked #16917
Open
1 of 4 tasks
I'm submitting a ...
Current behavior:
Entering a page which has an hardcoded option with null value gets the parameter
selected="false"
and creating problems on Chrome when new data is put on the object supplied in ng-options.Expected / new behavior:
The parameter
selected="false"
could be dropped when not selected. When selected, could just beselected
This was fixed in https://github.com/angular/angular.js/commit/27486bd15e70946ece2ba713e4e8654b7f9bddad but looks like is not used on select options.
Minimal reproduction of the problem with instructions:
On this example plunkr, the default option can be left as is, then by clicking on the button "add", on Chrome only, the select box will change to the option called "none". On Firefox, only page source is changed.
AngularJS version:
1.7.8
Browser:
Chrome 78.0.3904.97 (64 bit) (select button displays wrong data)
Firefox 68.2.0esr (64-bit) (only visible on page source, rendered select box keeps the same)
(both running in Debian 9)
Anything else:
Using jquery 2.2.4
Could be related with https://github.com/angular/angular.js/issues/16916 due to ambiguity of the selected option which should be displayed.
The text was updated successfully, but these errors were encountered: