Skip to content

MatInput: (keyup.enter) calling matPrefix method #11183

@ghost

Description

Bug, feature request, or proposal:

Bug

What is the expected behavior?

on matInput when you press enter (keyup.enter)="myFunction(), it should NOT calls click method on matPrefix

What is the current behavior?

method (keyup.enter)="myFunction() on matInput first calling method on matPrefix, then method on input.

What are the steps to reproduce?

  1. Try to type anything, then press enter
  2. See console (first calls click method on matPrefix, then on matInput)

https://stackblitz.com/edit/angular-wxpesf?file=app%2Finput-prefix-suffix-example.ts

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Material 6.0.0, all Browsers

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