# search: Fix focus replacement field when opening replace \(Ctrl\+H\) \(\#51061\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 4b1a2f3ad80f7a9ebd49c6fb3bbaa07766efb08a

Requested commit: 4b1a2f3ad80f7a9ebd49c6fb3bbaa07766efb08a

Commit: 4b1a2f3ad80f7a9ebd49c6fb3bbaa07766efb08a

Tree: 1b422f07a7d813ab8dc14052f95b2f71efed3344

Author: Giorgi Merebashvili

Committer: GitHub

## Message

```
search: Fix focus replacement field when opening replace (Ctrl+H) (#51061)

Previously, focus stayed on the search bar because a pre-focus check
`handle.is_focused(window)` was always false at deploy time.

Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- Fixed: When opening find-and-replace with `Ctrl+H`, the replacement
input is now focused instead of the search bar.
```

## Parents

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

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