# settings ui: Autoscroll content during keyboard navigation \(\#40734\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 4f5f29926520c6bf268b96720c594bd4375a2512

Requested commit: 4f5f29926520c6bf268b96720c594bd4375a2512

Commit: 4f5f29926520c6bf268b96720c594bd4375a2512

Tree: f18c165ef904103e7f25e889fc93622b56cf5ea5

Author: Anthony Eid

Committer: GitHub

## Message

```
settings ui: Autoscroll content during keyboard navigation (#40734)

Closes #40608

This fixes tabbing in both the settings ui nav bar and page content
going off screen instead of scrolling the focused element into a visible
view.

The bug occurred because `gpui::list` and `gpui::uniform_list` only
render visible elements, preventing non visible elements in a view from
having their focus handle added to the element tree. Thus making the tab
stop map skip over those elements because they weren't present.

The fix for this is scrolling to reveal non visible elements and then
focus the selected element on the next frame.

Release Notes:

- settings ui: Auto scroll to reveal items in navigation bar and window
when tabbing

---------

Co-authored-by: Ben Kunkle <ben@zed.dev>
```

## Parents

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

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