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

Combobox: prevent auto selection of the first element #583

Closed
evra opened this issue Sep 3, 2018 · 4 comments
Closed

Combobox: prevent auto selection of the first element #583

evra opened this issue Sep 3, 2018 · 4 comments

Comments

@evra
Copy link

evra commented Sep 3, 2018

Bug

The first element in the combobox is preselected when user starts typing in the input field. When user hits 'enter' the value of the first element gets applyed and replaces what the user already typed in the input field.

Package Version: 3.0.0

Expected behavior:

On Enter the value of the first element should not be copied into the input.

Actual behavior:

On Enter the value of the first element gets copied into the input field

@tomdye
Copy link
Member

tomdye commented Nov 22, 2018

@evra We intend the combo box to select the first matching item and set it as the input value when the user presses enter. Is there a specific set of steps to reproduce your issue outside of this scenario?

@evra
Copy link
Author

evra commented Nov 28, 2018

@tomdye The following steps can be used to reproduce the behavior:

First Scenario:

A combobox has two elements: 'A' and 'B', empty selection is allowed. None of the elements is selected in the combobox.

  1. User clicks on the input element
  2. A listbox is shown (first element is automatically marked as selected in the list).
  3. User types C
  4. Hits enter
  5. Combobox takesover the first element from the list (A) and not the C (expected)

Second Scenario

A combobox has two elements: 'A' and 'B', empty selection is allowed. B is selected.

  1. User clicks on the input element
  2. A listbox is shown (first element is automatically marked as selected in the list).
  3. User deletes the input
  4. Hits enter
  5. Combobox takesover the first element from the list (A) and not the empty value

@tomdye
Copy link
Member

tomdye commented Mar 22, 2021

Scenario one has been addressed and fixed in the typeahead, scenario two is a larger discussion around deselection which is being tracked and discussed via #1655

@tomdye
Copy link
Member

tomdye commented Mar 22, 2021

Closing this as will now be tracked via #1655

@tomdye tomdye closed this as completed Mar 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants