# settings_ui: Fix page scroll bar lagging behind when jumping to a section \(\#39897\) · gitcafe/zed

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

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

Visibility: public

Requested revision: e4f0fbbf8068e7ba2a309872e4e4c83a41689e2f

Requested commit: e4f0fbbf8068e7ba2a309872e4e4c83a41689e2f

Commit: e4f0fbbf8068e7ba2a309872e4e4c83a41689e2f

Tree: 29d305a1c4f6ea7234fdbec7ee3b45a53c286b70

Author: Anthony Eid

Committer: GitHub

## Message

```
settings_ui: Fix page scroll bar lagging behind when jumping to a section (#39897)

The issue was caused by the scroll handle taking a couple of frames to
update its offset correctly after calling
`ScrollHandle::scroll_to_top_of_item`. The fast fix is forcing 3 frames
to render back-to-back.

In the future, we should look into `ScrollHandle` and see if there's any
way to update its state outside of paint.

Release Notes:

- N/A

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
Co-authored-by: Katie Geer <katie@zed.dev>
Co-authored-by: Ben Kunkle <ben@zed.dev>
```

## Parents

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

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