Skip to content

Multiple mdAutocomplete Instances on One Page #7268

@OmarAlmootassem

Description

@OmarAlmootassem

Bug, feature request, or proposal:

Bug

What is the expected behavior?

When tabbing around multiple autocomplete fields and then choosing an option from one of the autocomplete fields, the model of the input in focus should get updated.

What is the current behavior?

Say there are 2 inputs with autocompletes that have different models. If you focus on the first one with a mouse and then tab to the second one, then on the second one you select one of the autocomplete options, the model for the first input gets updated instead of the second input.

If you switch between the autocompletes using a mouse click, they function perfectly.

What are the steps to reproduce?

  1. Focus on the first input with mouse
  2. Tab to another input
  3. Select an autocomplete option
  4. The first input gets updated instead of the one in focus

Plunker template: http://plnkr.co/edit/ZkhGO1T5s2IubavablcJ?p=preview

What is the use-case or motivation for changing an existing behavior?

As a bug fix to better support multiple autocomplete components on one page.

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

Angular 4.3.4+
Material 2.0.0 beta.10+

Is there anything else we should know?

Metadata

Metadata

Assignees

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