# Fix focus issues with gpui2 docks \(\#3606\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 468444020252dc2f31fa8122079eb1e982771f10

Requested commit: 468444020252dc2f31fa8122079eb1e982771f10

Commit: 468444020252dc2f31fa8122079eb1e982771f10

Tree: 33411d440e29486a358bb10225dda4f07c30b284

Author: Kirill Bulatov

Committer: GitHub

## Message

```
Fix focus issues with gpui2 docks (#3606)

* Fixed dock toggling not focusing the terminal element
* Fixed loosing focus on dock close (e.g. cmd-d on the last terminal in
the dock)
* Removed element stateless focus API since it would not work when the
element is not rendered, update all API usages to the stateful one via
`gpui::Subscription`

Release Notes:

- N/A
```

## Parents

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

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

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