# gpui: Fix Interactivity prepaint to update scroll_handle bounds \(\#35013\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 65759d43163bd36cce8f8aa492ba2628ca005a7a

Requested commit: 65759d43163bd36cce8f8aa492ba2628ca005a7a

Commit: 65759d43163bd36cce8f8aa492ba2628ca005a7a

Tree: 816d43fd48285690ae5c79feae222d42e3ed5bf5

Author: Jason Lee

Committer: GitHub

## Message

````
gpui: Fix Interactivity prepaint to update scroll_handle bounds (#35013)

It took a long time to check this problem.

Finally, I found that due to a detail missing when changing #34832, the
bounds of `ScrollHandle` was not updated in the Interactivity `prepaint`
phase.

```diff
- scroll_handle_state.padded_content_size = padded_content_size;
+ scroll_handle_state.max_offset = scroll_max;
```

It was correct before the change, because the `padded_content_size`
(including `bounds.size`) was saved before, and the bounds was missing
after changing to `max_offset`, but the bounds were not updated
anywhere.

So when `scroll_handle.bounds()` is obtained outside, it is always 0px
here.

@MrSubidubi

Release Notes:

- N/A
````

## Parents

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

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