Skip to content

focus gets stuck in TabNav focuszone within ActionMenu.Overlay  #2340

@jdrush89

Description

@jdrush89

Description

If I have a TabNav within an ActionMenu.Overlay and focusable items above and below it, focus can get stuck in the TabNav and I will be unable to navigate to the top item. It seems like there is a top level focuszone for the overlay and another focuszone within the TabNav. When focus moves into the tabnav, the top level focuszone expects it to move to the rightmost tab, but the tabNav moves focus to the selected tab. This seems to cause the top level focuszone to lose track of which element is focused and it stops processing key presses to move the focus up out of the TabNav.

Steps to reproduce

  1. Go to https://codesandbox.io/s/primer-components-ts-testing-forked-7defd0?file=/src/index.tsx
  2. Click to open the menu
  3. Use the down arrow key to nav to the delete file button
  4. Try to use the up arrow key to get back to the top text field
  5. Observe that focus gets trapped on the selected tab.

Version

v35.9.0

Browser

Chrome

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingreactsupportTasks where the team is supporting and helping other teams

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions