Skip to content

[Combobox] Cannot focus last remaining item in multiple selection mode via keyboard #2443

@halljus

Description

@halljus

Description

When I remove all but one item in a multiple selection Combobox using the keyboard, I expect to be able to focus (and remove) the last one, but I am unable to do so (arrow keys do not focus the last remaining item).

Steps to reproduce

  1. Go to https://sparkui.vercel.app/?path=/docs/components-combobox--docs#default-1
  2. Focus the input
  3. Press Left Arrow twice to focus the "To Kill a Mockingbird" selected item
  4. Press Delete to remove the selected item
  5. Press Tab to focus the input again
  6. Press Left Arrow

I expected it to focus the last remaining selected item ("War and Peace"), but it doesn't seem to move focus.

Spark Component and Version

@spark-ui/combobox@5.6.0

Browser

Microsoft Edge 129

Operating System

  • macOS
  • Windows
  • Linux

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions