# Restore focus to previously focused view when dismissing a modal \(\#2680\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 1914037922b90f763076febc109c33bf58a15726

Requested commit: 1914037922b90f763076febc109c33bf58a15726

Commit: 1914037922b90f763076febc109c33bf58a15726

Tree: d388e0fa00a26e15940bca6ab4d62816dd3b9114

Author: Antonio Scandurra

Committer: GitHub

## Message

```
Restore focus to previously focused view when dismissing a modal (#2680)

Fixes
https://linear.app/zed-industries/issue/Z-2500/focus-is-moved-from-the-assistant-panel-when-opening-and-closing

Release Notes:

- Fixed a bug that caused modals (such as the command palette) to not
restore focus when dismissing them.
```

## Parents

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

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

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