# docs: Fix bug on table of contents \(\#43840\) · gitcafe/zed

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

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

Visibility: public

Requested revision: ca6e64d45180f0c7c6d77fd8f5e97941ba78ef95

Requested commit: ca6e64d45180f0c7c6d77fd8f5e97941ba78ef95

Commit: ca6e64d45180f0c7c6d77fd8f5e97941ba78ef95

Tree: f6983138f4e69d918183e91143b75be9214e94bc

Author: Danilo Leal

Committer: GitHub

## Message

```
docs: Fix bug on table of contents (#43840)

We were previously always highlighting the last header in the table of
contents as active even if you were at the top of the page. This is now
fixed, where upon loading the page, no header is highlighted, and as you
scroll, we highlight the top-most heading one by one.

Release Notes:

- N/A
```

## Parents

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

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