Skip to content

Is there a way to disable spacebar accessibility for <Select /> #643

@Blankeos

Description

@Blankeos

I'm making a video editor so I kinda want to disable spacebar for Select because it's mostly used for Pause/Play. It ends up being more of a pain than keyboard-accessible, because pressing spacebar selects a new option when the user expects that it'll play/pause. I think Enter does the job right? Or am I wrong here?

Or atleast blur when I do this? Because it doesn't unfocus the Select when I press escape.

<Select
                    onKeyDown={(e) => {
                      console.log("BLUR", e.code)
                      if (e.code === "Escape") {
                        document.body.focus()
                        e.currentTarget.blur()
                      }
                    }} >

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