Skip to content

Filtered Dropdown does not commit the active option with ArrowDown and Enter #239

Description

@woksin

What happens

In @cratis/components 4.1.0, a filtered single-select Dropdown can narrow correctly to one visible option, but ArrowDown followed by Enter does not commit it. In a current consumer browser run, typing front left exactly Frontend developer; ArrowDown+Enter then left the input value as front, emitted no selected option, kept aria-expanded="true", and left the listbox open.

Evidence

The evidence is bound to exact tag v4.1.0 (c4c4cc9a13c6416eb3ab31701546e961b4e9da72):

  • DropdownImplementation.tsx owns the filtered single-select ComboBox, input, selected key, onChange, open state, popover, listbox, and keyed options.
  • Filtering and the combobox/listbox relationship succeed before the failed selection transition, so this is not an absent-option or closed-overlay setup failure.
  • Exact-tag Dropdown specs cover values, labels, callbacks, filter placeholder, semantic states, and filtered multiple selection, but not the single-select filter → ArrowDown → Enter browser path.

What it costs a consumer

The consumer passes ordinary value, label/value fields, filtering, accessible identity, and the documented value-first callback, with no custom keyboard handling. Keyboard-only users cannot commit the narrowed option. A consumer keydown wrapper would duplicate collection, active-option, callback, and close behavior and could double-commit after a package fix.

Suggested fix — the seam

Repair the package-owned filtered single-select ComboBox selection wiring so ArrowDown makes the remaining option keyboard-active and Enter commits it through the value-first callback exactly once and closes the overlay. Add a real-browser package regression that observes the callback value, selected label/value, aria-expanded="false", and listbox closure; retain Escape-without-change behavior.

What is explicitly not being asked for

  • No consumer-side keyboard handler.
  • No prescribed internal mechanism: current evidence does not settle whether collection state, key mapping, controlled value, or React Aria composition causes it.
  • No change to the value-first callback contract.
  • No folding of the adjacent event.value documentation examples into this runtime defect.

Related, not duplicate

#211 is broad cross-browser and assistive-technology certification work. It is related, but it does not describe or settle this atomic filtered-keyboard commit defect.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions