# copilot: Track focus of modal \+ close modal on ESC \(\#9217\) · gitcafe/zed

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

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

Visibility: public

Requested revision: e10360713453d98a3a7befc54a0379b1757decb5

Requested commit: e10360713453d98a3a7befc54a0379b1757decb5

Commit: e10360713453d98a3a7befc54a0379b1757decb5

Tree: eba06bebfa60b6316319cbaa806699547f57f0ed

Author: Piotr Osiewicz

Committer: GitHub

## Message

```
copilot: Track focus of modal + close modal on ESC (#9217)

I've also made Copilot's modal regain focus whenever you click on it, as
otherwise there's nothing inside of it that can gain focus. Clicks do
not fall through a modal, which I think is nice.



Release Notes:

- Fixed the issue where pressing ESC (`menu::Cancel`) did not exit the
Copilot modal. Fixes #8852
```

## Parents

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

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