Skip to content

[combobox] Focus does not loop correctly — requires two Down Arrow presses for focus to wrap from last item to first #3456

@bbetav1

Description

@bbetav1

Current Behavior

When using the Combobox component with loop focus enabled (which is the default, as it allows looping through items), pressing the down arrow key from the last item does not immediately focus the first item. Instead, the focus seems to disappear or go elsewhere (I'm not sure where), and I need to press the down arrow a second time to reach the first item. This disrupts smooth keyboard navigation.

Expected Behavior

Pressing the down arrow from the last item should seamlessly loop back and focus the first item on the first press, without any skip or lost focus. For comparison, in similar libraries like Ark UI (https://ark-ui.com/docs/components/combobox), the combobox handles this looping correctly without requiring an extra key press.

Steps To Reproduce

  1. Go to the official Base UI Combobox documentation: https://base-ui.com/react/components/combobox.
  2. Open the combobox popup (on any example).
  3. Use the down arrow to navigate to the last item.
  4. Press down arrow again —focus doesn't go to the first item; press once more to get there.

Environment

  • Base UI version: 1.0.0-rc.0
  • Browser: Brave 1.85.111 (Official Build) (64-bit), Chromium: 143.0.7499.40
  • OS: Windows 10

I noticed that the example of combobox from Floating UI home page has the same problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: comboboxChanges related to the combobox component.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions