Skip to content

Autocomplete: entering text in input field messes with Storybook shortcuts #7958

Open
@jeffijoe

Description

@jeffijoe

Provide a general summary of the issue here

Typing in the autocomplete input triggers Storybook shortcuts, whereas typing in the same component without <Autocomplete> works as expected.

See the official Autocomplete example story.

🤔 Expected Behavior?

The input shouldn't be triggering app-wide shortcuts as the user is typing in the input field.

😯 Current Behavior

When hitting a key that has an application-defined shortcut, that shortcut is triggered, as well as the key is being entered.

💁 Possible Solution

No response

🔦 Context

It makes testing in Storybook a pain.

🖥️ Steps to Reproduce

  1. Open the official Autocomplete storybook.
  2. Focus the input field in the autocomplete
  3. Type m
  4. The Storybook "measure" tool is activated.

Do the same in a regular input, and it'll work as expected.

Version

react-aria: 3.38.1, react-aria-components: 1.7.1

What browsers are you seeing the problem on?

Chrome

If other, please specify.

No response

What operating system are you using?

macOS

🧢 Your Company/Team

No response

🕷 Tracking Issue

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