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-select poorly handles "space" when performing typeahead #17774

Closed
jshoudy opened this issue Nov 21, 2019 · 1 comment · Fixed by #17785 or hrueger/AGLight#112
Closed

mat-select poorly handles "space" when performing typeahead #17774

jshoudy opened this issue Nov 21, 2019 · 1 comment · Fixed by #17785 or hrueger/AGLight#112
Assignees
Labels
G This is is related to a Google internal issue P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@jshoudy
Copy link

jshoudy commented Nov 21, 2019

Reproduction

repro: https://stackblitz.com/edit/angular-hr8bq9

Steps to reproduce issue 1:

  1. Focus on select with it closed
  2. Type "United K"
  3. When the space character is typed the select is opened

Steps to reproduce issue 2:

  1. Open select
  2. Type "United K"
  3. When the space character is typed the select is closed and "United States" is selected

Expected Behavior

What behavior were you expecting to see?
Space does not open/close the select when typeahead is being performed. " " character should be treated as part of the typeahead as long as the debounce time has not yet cleared.

Actual Behavior

What behavior did you actually see?
Space always opens the select when closed and always closes the select and selects an option when it is open.

Environment

  • Angular:
  • CDK/Material:
  • Browser(s):
  • Operating System (e.g. Windows, macOS, Ubuntu):
@jelbourn jelbourn added the G This is is related to a Google internal issue label Nov 21, 2019
@crisbeto crisbeto self-assigned this Nov 22, 2019
@crisbeto crisbeto added has pr P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent labels Nov 22, 2019
crisbeto added a commit to crisbeto/material2 that referenced this issue Nov 22, 2019
We support typing into a select to skip to an item, as well as pressing space to open the select, however if the user is typing something that has a space in it, the select will open and interrupt the user. These changes add some logic so that we don't trigger the panel while the user is typing.

Fixes angular#17774.
crisbeto added a commit to crisbeto/material2 that referenced this issue Nov 22, 2019
We support typing into a select to skip to an item, as well as pressing space to open the select, however if the user is typing something that has a space in it, the select will open and interrupt the user. These changes add some logic so that we don't trigger the panel while the user is typing.

Fixes angular#17774.
crisbeto added a commit to crisbeto/material2 that referenced this issue Nov 25, 2019
We support typing into a select to skip to an item, as well as pressing space to open the select, however if the user is typing something that has a space in it, the select will open and interrupt the user. These changes add some logic so that we don't trigger the panel while the user is typing.

Fixes angular#17774.
jelbourn pushed a commit that referenced this issue Nov 26, 2019
We support typing into a select to skip to an item, as well as pressing space to open the select, however if the user is typing something that has a space in it, the select will open and interrupt the user. These changes add some logic so that we don't trigger the panel while the user is typing.

Fixes #17774.
jelbourn pushed a commit that referenced this issue Nov 26, 2019
…17785)

We support typing into a select to skip to an item, as well as pressing space to open the select, however if the user is typing something that has a space in it, the select will open and interrupt the user. These changes add some logic so that we don't trigger the panel while the user is typing.

Fixes #17774.
@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 Dec 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
G This is is related to a Google internal issue P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
3 participants