Skip to content

Autocomplete focus when inside a dialog #7972

Closed
@Swoox

Description

@Swoox

Bug, feature request, or proposal:

Bug

What is the expected behavior?

When opening a dialog the autocomplete doesn't have focus.
Expected: https://angular-qgx8sh.stackblitz.io/

What is the current behavior?

When opening a dialog my autocomplete get focussed.

What are the steps to reproduce?

Just open a dialog with data of the states in it:
this.dialog.open(SlideInToolbar, { width: '150px', data: { states: this.states } });

And inside the dialog an autocomplete with:
<mat-option *ngFor="let item of data.states" [value]="item.name">

https://angular-omzvev.stackblitz.io/

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

I want to implement a autocomplete in a dialog without focus.

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

Angular: 4.4.4
Material: 2.0.0-beta.12

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