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

Autocomplete: https://material.angular.io/components/autocomplete/overview weird behavior with simple autocomplete #15177

Closed
sirkhin opened this issue Feb 13, 2019 · 8 comments · Fixed by #16020
Assignees
Labels
area: material/autocomplete feature This issue represents a new feature or feature request rather than a bug or bug fix P4 A relatively minor issue that is not relevant to core functions

Comments

@sirkhin
Copy link

sirkhin commented Feb 13, 2019

What is the expected behavior?

Ideally you should be given a choice: what should be the behavior when you click on autocomplete. But current behavior at least looks pretty unfriendly to user (from my point of view).

What is the current behavior?

Currently you're only able to open autocomplete again if you eith focus any other control and then focus autocomplete again; or remove the character from the selected option

What are the steps to reproduce?

https://material.angular.io/components/autocomplete/overview

  1. go to https://material.angular.io/components/autocomplete/overview#simple-autocomplete
  2. select any value
  3. try to open autocomplete again

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

I believe the latest version of Angular

Is there anything else we should know?

@crisbeto
Copy link
Member

For what it's worth, you can also reopen it by pressing the up or down arrow keys.

@sirkhin
Copy link
Author

sirkhin commented Feb 14, 2019

Shame on me... Not sure if this ticket is still actual then. But just to clarify: Is it possible to review my option (declare the behavior of autocomplete when we click on while some option is selected) ? Or it's quite complicated and not an option here?

@crisbeto
Copy link
Member

It shouldn't be complicated and comparing the UX to the autocomplete on the Google Search, it also reopens when you click on it again. @jelbourn should we try to match the UX from Google Search?

@jelbourn jelbourn added discussion feature This issue represents a new feature or feature request rather than a bug or bug fix P4 A relatively minor issue that is not relevant to core functions labels May 12, 2019
@jelbourn
Copy link
Member

@crisbeto I don't quite follow- are the steps

  1. Type something
  2. Select an option with the keyboard
  3. Click the input again
    ?

@crisbeto
Copy link
Member

Yes. our autocomplete won't reopen when you click on it while it still has focus since we depend on the focus event.

@jelbourn
Copy link
Member

That seems reasonable, though I don't think it's the highest priority change

@crisbeto crisbeto self-assigned this May 13, 2019
crisbeto added a commit to crisbeto/material2 that referenced this issue May 14, 2019
Currently if the user clicks an autocomplete to open it, selects an option and then clicks again, the panel won't open, because we use `focus` and the input was focused already. These changes add an extra `click` listener so the panel can reopen.

Fixes angular#15177.
crisbeto added a commit to crisbeto/material2 that referenced this issue Sep 9, 2019
Currently if the user clicks an autocomplete to open it, selects an option and then clicks again, the panel won't open, because we use `focus` and the input was focused already. These changes add an extra `click` listener so the panel can reopen.

Fixes angular#15177.
crisbeto added a commit to crisbeto/material2 that referenced this issue Sep 13, 2019
Currently if the user clicks an autocomplete to open it, selects an option and then clicks again, the panel won't open, because we use `focus` and the input was focused already. These changes add an extra `click` listener so the panel can reopen.

Fixes angular#15177.
@angular-robot
Copy link
Contributor

angular-robot bot commented Feb 21, 2022

Just a heads up that we kicked off a community voting process for your feature request. There are 20 days until the voting process ends.

Find more details about Angular's feature request process in our documentation.

crisbeto added a commit to crisbeto/material2 that referenced this issue Feb 25, 2022
Currently if the user clicks an autocomplete to open it, selects an option and then clicks again, the panel won't open, because we use `focus` and the input was focused already. These changes add an extra `click` listener so the panel can reopen.

Fixes angular#15177.
crisbeto added a commit to crisbeto/material2 that referenced this issue Feb 25, 2022
Currently if the user clicks an autocomplete to open it, selects an option and then clicks again, the panel won't open, because we use `focus` and the input was focused already. These changes add an extra `click` listener so the panel can reopen.

Fixes angular#15177.
crisbeto added a commit to crisbeto/material2 that referenced this issue Feb 25, 2022
Currently if the user clicks an autocomplete to open it, selects an option and then clicks again, the panel won't open, because we use `focus` and the input was focused already. These changes add an extra `click` listener so the panel can reopen.

Fixes angular#15177.
crisbeto added a commit that referenced this issue Feb 25, 2022
Currently if the user clicks an autocomplete to open it, selects an option and then clicks again, the panel won't open, because we use `focus` and the input was focused already. These changes add an extra `click` listener so the panel can reopen.

Fixes #15177.
crisbeto added a commit that referenced this issue Feb 25, 2022
Currently if the user clicks an autocomplete to open it, selects an option and then clicks again, the panel won't open, because we use `focus` and the input was focused already. These changes add an extra `click` listener so the panel can reopen.

Fixes #15177.

(cherry picked from commit 16dea18)
@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 Mar 28, 2022
forsti0506 pushed a commit to forsti0506/components that referenced this issue Apr 3, 2022
Currently if the user clicks an autocomplete to open it, selects an option and then clicks again, the panel won't open, because we use `focus` and the input was focused already. These changes add an extra `click` listener so the panel can reopen.

Fixes angular#15177.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: material/autocomplete feature This issue represents a new feature or feature request rather than a bug or bug fix P4 A relatively minor issue that is not relevant to core functions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants