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.

Number field with datalist does not trigger change event #17113

@nepa

Description

@nepa

I'm submitting a ...

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

Current behavior:
Input field for numbers does not trigger change event, when option from datalist is selected.

This applies to both, Microsoft Edge and Internet Explorer 11. Opera works as expected.

Expected / new behavior:
Model should change, once a suggested value is selected from the datalist.

The ng-change callback should also trigger, once a new value is selected.

Minimal reproduction of the problem with instructions:

<input type="number" list="suggestions" ng-model="willNotChange" ng-change="notTriggered()" />

<datalist id="suggestions">
  <option value="0.5"></option>
  <option value="1"></option>
  <option value="1.5"></option>
  <option value="2"></option>
</datalist>

{{willNotChange | json}}

AngularJS version: 1.8.2

Browser: [ Microsoft Edge | IE 11 ]

Anything else: Works fine in Opera.

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