Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
thanhhaimai opened this issue Jul 24, 2018 · 1 comment · Fixed by #12372
Closed

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

thanhhaimai opened this issue Jul 24, 2018 · 1 comment · Fixed by #12372
Assignees
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@thanhhaimai
Copy link

thanhhaimai commented Jul 24, 2018

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?

@crisbeto crisbeto self-assigned this Jul 24, 2018
@crisbeto crisbeto added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent has pr labels Jul 25, 2018
crisbeto added a commit to crisbeto/material2 that referenced this issue Jul 25, 2018
Fixes a closed autocomplete being reopened, if the user moves to another tab and coming back to the current one, while the input is still focused.

Fixes angular#12337.
crisbeto added a commit to crisbeto/material2 that referenced this issue Jul 25, 2018
Fixes a closed autocomplete being reopened, if the user moves to another tab and coming back to the current one, while the input is still focused.

Fixes angular#12337.
crisbeto added a commit to crisbeto/material2 that referenced this issue Jul 25, 2018
Fixes a closed autocomplete being reopened, if the user moves to another tab and coming back to the current one, while the input is still focused.

Fixes angular#12337.
crisbeto added a commit to crisbeto/material2 that referenced this issue Aug 3, 2018
Fixes a closed autocomplete being reopened, if the user moves to another tab and coming back to the current one, while the input is still focused.

Fixes angular#12337.
jelbourn pushed a commit that referenced this issue Aug 23, 2018
Fixes a closed autocomplete being reopened, if the user moves to another tab and coming back to the current one, while the input is still focused.

Fixes #12337.
jelbourn pushed a commit that referenced this issue Aug 23, 2018
…tab (#12372)

Fixes a closed autocomplete being reopened, if the user moves to another tab and coming back to the current one, while the input is still focused.

Fixes #12337.
jelbourn pushed a commit that referenced this issue Aug 29, 2018
…tab (#12372)

Fixes a closed autocomplete being reopened, if the user moves to another tab and coming back to the current one, while the input is still focused.

Fixes #12337.
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants