Skip to content

mat-autocomplete panel reopens again after browser tab switch #12337

Closed
@thanhhaimai

Description

@thanhhaimai

Bug, feature request, or proposal:

What is the expected behavior?

Autocomplete panel should stay closed regardless of whether it has the focus when the user switches browser tab.

What is the current behavior?

Autocomplete panel reopens itself after the user switches browser tab, without user's interaction. See steps below.

What are the steps to reproduce?

  1. Go to https://material.angular.io/components/autocomplete/overview
  2. Select any option on any drop down. Keep the focus on the same drop down.
  3. Notice that the autocomplete panel has closed.
  4. Switch to another browser tab.
  5. Switch back to the previous browser tab.
  6. Notice that the autocomplete panel has been opened again, without user interaction.

Note that it works as expected if the user remove focus from the drop down in step 2). Switching tab doesn't reopen the autocomplete panel.

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

It's confusing for the user when the autocomplete panel reopens itself again without user's interaction. The user selected an option. The autocomplete panel state should be closed.

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

Angular 6.4.1 (the one running on material.angular.io), Linux, latest Chrome.

Is there anything else we should know?

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions