Skip to content

bug(MatInputHarness): Does not properly set negative value with <input type="number"> #19314

Closed
@hnuttin

Description

@hnuttin

Reproduction

https://stackblitz.com/edit/mat-input-harness-negative-issue

Is this related to #18812 ?

Steps to reproduce:

  1. use an html <input type="number">
  2. set a negative value using the MatInputHarness.setValue('-2')
  3. check the value using MatInputHarness.getValue()
  4. this value will be positive '2'

Expected Behavior

Value should be set to negative number

Actual Behavior

The value has a positive value

Environment

  • Angular: 9.1.6
  • CDK/Material: 9.1.6
  • Browser(s): Chrome 81.0.4044.113
  • Operating System (e.g. Windows, macOS, Ubuntu): macOS 10.15.4

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