Skip to content

react-aria-components Combobox selects focused item on Tab keydown #8744

@42tte

Description

@42tte

Provide a general summary of the issue here

The Combobox component currently selects an item from ListBox and triggers onInputChange when the ListBoxItem is focused and the key Tab is keydown.

🤔 Expected Behavior?

According to W3C pattern for Combobox this doesn't seem like this is suggested behaviour. And this is not how a select element works.

😯 Current Behavior

The Combobox component currently selects an item from ListBox and triggers onInputChange when the ListBoxItem is focused and the key Tab is keydown.

💁 Possible Solution

This comes from Changed the behavior of bluring the combobox to not select the focused item. Instead, this is only done when using the keyboard to blur (Tab key). It was weird to hover over an item and then click outside and it selected that option.

🔦 Context

No response

🖥️ Steps to Reproduce

Demo

  1. enter Favorite Animal input
  2. press ArrowDown
  3. press Tab
  4. Aardvark is now selected

Version

[email protected]

What browsers are you seeing the problem on?

Chrome, Safari, Firefox, Microsoft Edge

If other, please specify.

No response

What operating system are you using?

Mac OS

🧢 Your Company/Team

No response

🕷 Tracking Issue

No response

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