Skip to content

Menus do not restore focus #8517

@SLaks

Description

@SLaks

Dependencies check up

  • I have verified that I use latest version of all @mantine/* packages

What version of @mantine/* packages do you have in package.json?

8.3.9

What package has an issue?

@mantine/core

What framework do you use?

Vite

In which browsers you can reproduce the issue?

None

Describe the bug

Selecting a menu item (and closing the menu) does not restore focus to the menu button.

  1. Open https://mantine.dev/core/menu/
  2. Select an item from any of the menus
  3. Press Tab

Instead of focusing the next button after the menu's trigger, it will focus the first focusable item on the page.

If possible, include a link to a codesandbox with a minimal reproduction

https://mantine.dev/core/menu/

Possible fix

No response

Self-service

  • I would be willing to implement a fix for this issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    FixedCompleted issues that will be published with next patch (1.0.X)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions