Skip to content

Popover does not refocus onto activator after close #12249

@kellydanma

Description

@kellydanma

Summary

According to our docs:

When the popover is closed, focus returns to the element that launched it

I tried testing this out and it is not the case when the popover closes... unless I'm misinterpreting the docs somewhere? I'm not sure if this is working as intended or is a bug, to be honest. Happy to log an issue if it's undesired behaviour, and work on it too 🙏

13-31-vm9av-v8il0

Expected behavior

I was expecting focus to return to the button "More actions" once the popover closed.

Actual behavior

Instead, focus is lost and restarts at the beginning of the page.

Steps to reproduce

🔗 See sandbox

Are you using React components?

Yes

Polaris version number

latest

Browser

Chrome

Device

MacOS

Metadata

Metadata

Labels

BugSomething is broken and not working as intended in the system.untriaged

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions