Skip to content

In Firefox, select tags do not update the controls object in ngControls #8030

@mLaird

Description

@mLaird

In beta.14, when a user selects from a select tag, in Firefox, the controls object does not update the value of the element, nor other properties like _pristine and _touched. All these properties are correctly updated in the controls object for a form's input tags, but not for select tags. No Console error occurs. The problem is in the properties of the controls object. For example, when country is selected in a select and an address is entered in an input:
controls: Object
country: Object
_pristine: true
_touched: true
_value: ""
address: Object
_pristine: false
_touched: true
_value: "4 Main Street"

The HTML for this situation is:
COUNTRY
<select name="country" id="country" md-select [(value)]="residenceForm.country" ngControl='country' #country="ngForm" [ngFormControl]="residenceForm.controls['country']">
<option *ngFor="#country of countries" [ngValue]="country.name">
{{country.name}}

The controls object properly updates in Chrome. I have not tested the update of the controls object for radio buttons and check boxes, nor have I tested it in the Edge browser.

IMPORTANT: This repository's issues are reserved for feature requests and bug reports. Do not submit support requests here, see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question.

Steps to reproduce and a minimal demo of the problem

Use https://plnkr.co or similar -- try this template as a starting point: http://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5

What steps should we try in your demo to see the problem?

Current behavior

Expected/desired behavior

Other information

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions