# ui: Fix popover menu not restoring focus to the previously focused element \(\#41751\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/a9bc890497f1edaf4f177385cf96785de60e910c)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: a9bc890497f1edaf4f177385cf96785de60e910c

Requested commit: a9bc890497f1edaf4f177385cf96785de60e910c

Commit: a9bc890497f1edaf4f177385cf96785de60e910c

Tree: 2cb8284c2a2b42193680fce835dac52492695a08

Author: Mayank Verma

Committer: GitHub

## Message

```
ui: Fix popover menu not restoring focus to the previously focused element (#41751)

Closes #26548

Here's a before/after comparison:


https://github.com/user-attachments/assets/21d49db7-28bb-4fe2-bdaf-e86b6400ae7a

Release Notes:

- Fixed popover menus not restoring focus to the previously focused
element
```

## Parents

- [d887e2050fc90af3d3210e6bd1eee5989431b811](https://git.cafe/gitcafe/zed/commit/d887e2050fc90af3d3210e6bd1eee5989431b811?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/a9bc890497f1edaf4f177385cf96785de60e910c?format=markdown)
