Skip to content

[combobox] Closed-trigger typeahead selects disabled items #5776

Description

@lyzno1

Current behavior

Typing on a closed Combobox trigger can select a disabled item and call onValueChange with its value.

Expected behavior

Skip disabled items and select the next enabled match. If no enabled item matches, leave the value unchanged.

Reproducible example

StackBlitz reproduction

  1. Leave the popup closed with Banana selected.
  2. Use Tab to focus the trigger.
  3. Press a.

Apple is selected even though its Combobox.Item is disabled. Apricot is enabled and should be selected instead.

Base UI version

The reproduction uses @base-ui/react: latest. Also reproduced locally on master at 52c38143e (1.8.0).

Environment

Chromium on macOS; no assistive technology.

Additional context

ComboboxTrigger commits the typeahead match directly without filtering disabled items, bypassing the item's click guard.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: comboboxChanges related to the combobox component.status: waiting for maintainerThese issues haven't been looked at yet by a maintainer.type: bugIt doesn't behave as expected.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions