Skip to content

Spacebar input is ignored by input fields inside GridListItem if Drag and Drop is in useΒ #8618

@vezaynk

Description

@vezaynk

Provide a general summary of the issue here

When I use GridList + GridListItem + useDragAndDrop, and put an <input /> into the GridListItem, selecting a typing into the input generally works except if I hit space. In which case, the space will be ignored entirely.

Interestingly, this only happens if there is other text inside the input already. Hitting spacebar alone works: typing works fine. Typing "She sells sea shells" results in "Shesellsseashells".

πŸ€” Expected Behavior?

Space inputs should work when typed into a field

😯 Current Behavior

Space inputs don't work when typed into a field

πŸ’ Possible Solution

Let spacebar events propagate the focused elements inside the GridListItem

πŸ”¦ Context

We use GridList for rich, interactive cards with many kinds of inputs. Breaking the users' space inputs is a big issue.

Image

πŸ–₯️ Steps to Reproduce

Code sandbox: https://codesandbox.io/p/sandbox/musing-cori-xzfcr8?file=%2Fsrc%2FApp.js

Attempt to type "Hello my name is ..." into one of the input fields. The entered text will be "Hellomynameis..."

Version

react-aria-components: 1.11.0

What browsers are you seeing the problem on?

Firefox, 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

    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