vmware-archive / clarity

Clarity is a scalable, accessible, customizable, open source design system built with web components. Works with any JavaScript framework, built for enterprises, and designed to be inclusive.
http://clarity.design
MIT License
6.43k stars 763 forks source link

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

Closed KingMario closed 2 years ago

KingMario commented 2 years ago

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 version:

Framework:

KingMario commented 2 years ago

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.

Jinnie commented 2 years ago

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.

github-actions[bot] commented 1 year ago

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.