# Fix focus lost when navigating to settings subpages \(\#45111\) · gitcafe/zed

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

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

Visibility: public

Requested revision: f6c944f8651c8dedbb0f0e3fdc9c13f955f5e7a6

Requested commit: f6c944f8651c8dedbb0f0e3fdc9c13f955f5e7a6

Commit: f6c944f8651c8dedbb0f0e3fdc9c13f955f5e7a6

Tree: 1124f88849c4f4ca90b77300f03bee891090762f

Author: Antonio Scandurra

Committer: GitHub

## Message

```
Fix focus lost when navigating to settings subpages (#45111)

Fixes #42668

When clicking 'Configure' to enter a settings subpage, focus was being
lost because push_sub_page only called cx.notify() without managing
focus. Similarly, pop_sub_page had the same issue when navigating back.

This fix:
- Adds window parameter to push_sub_page and pop_sub_page
- Focuses the content area when entering/leaving subpages
- Resets scroll position when entering a subpage

Release Notes:

- Fixed a bug that prevented keyboard navigation in the settings window.
```

## Parents

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

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