Skip to content

PopoverMenu eats Key.Space inputs #4074

Closed
@Error-String-Expected-Got-Nil

Description

Describe the bug
I have a TextView for getting some user input. When I try to input into it, is seems to work fine, except for the space key, which doesn't do anything.

After quite a bit of investigation with a debugger, I have managed to determine the root cause is that the space input is getting eaten by a popover menu created by a menu bar I added. Apparently menu bar popovers are by default configured to have space as a hotkey for 'select'. However, popovers can eat key inputs even when unfocused, so now my TextView isn't able to accept space inputs.

To Reproduce
Steps to reproduce the behavior:

  • Create a new window
  • Add a MenuBarv2 to it with at least one MenuBarItemv2 with at least one MenuItemv2 (unsure if necessary, but it's what mine has)
  • Create a TextField or TextView in the same window
  • Run the application, enter the text input, and attempt to enter a space key
  • Observe that nothing happens

Expected behavior
You should be able to enter spaces when you have a menu bar.

An actual text character like space probably shouldn't be a global hotkey like this. Or at the very least, it should be possible to make MenuBarv2 popover menus non-global, or remove the space key from their hotkeys. If that is possible already, I would like to know how, but I also still think this shouldn't be the default behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status

    ✅ Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions