Skip to content

[EuiContextMenu][KEYBOARD]: Focus needs to be returned to button when closing context menu #5404

Closed

Description

@thomheymann

cc @1Copenut

Focus isn't returned to the triggering button element when closing a context menu.

Steps to reproduce

  1. Go to https://elastic.github.io/eui/#/navigation/context-menu
  2. Click "click me to load a context menu" button.
  3. Tab through the menu, then press ESC to close the menu
  4. Verify the body tag has keyboard focus (document.activeElement)

Plain EuiPopover components work fine. As soon as you add an EuiContextMenu to the EuiPopover the focus isn't returned correctly to the trigger button element when closing the context menu.

Screenshot 2021-11-23 at 13 13 17

Related issues

Activity

  1. changed the title [-]Bug: Focus needs to be returned to button when closing context menu[/-] [+][EuiContextMenu][KEYBOARD]: Focus needs to be returned to button when closing context menu[/+] on Mar 14, 2022
  2. self-assigned this
    on Apr 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions