vmware-archive/clarity

Combobox popup is not closed on [Enter] key after reopened

KingMario opened this issue · 3 comments

Describe the bug

When re-enter a combobox and open the popup with [DownArrow], its popup is not closed on [Enter].

How to reproduce

Steps to reproduce the behavior:

  1. this page.
  2. Enter al to open the popup, and hit [Enter] to select Alabama.
  3. Observe the popup is closed.
  4. Use [DownArrow] key to reopen the popup.
  5. Hit [Enter].
  6. Observe the popup remains open.

Expected behavior

The popup should be closed on [Enter] key even if the value is not changed.

Versions

Clarity project:

  • Clarity Core
  • Clarity Angular/UI

Clarity version:

  • v3.x
  • v4.x
  • v5.x

Framework:

  • Angular
  • React
  • Vue
  • Other:

The following issue is also observed occasionally:

When there's ONLY one item in the dropdown, the dropdown is not closed after user clicks the item.

It only gets closed if the selection gets changed. If you "select" the same item, as in the described scenario, it is not recognized as a new selection.
Comparing to the W3C aria combobox examples, we can accept this as a bug and fix it.

Hi there 👋, this is an automated message. To help Clarity keep track of discussions, we automatically lock closed issues after 14 days. Please look for another open issue or open a new issue with updated details and reference this one as necessary.