Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was 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
@mjmlopes

Description

@mjmlopes

I'm submitting a ...

  • regression from 1.7.0
  • security issue
  • issue caused by a new browser version
  • other

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 be selected
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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions