Bugs
Done

TOC: Highlighting in the TOC box doesn't match with the cursor's position in the Page

What went wrong?

  1. Have a long text in a Page with some Toggles, some closed, some open.
  2. Put the cursor somewhere in the text.
  3. Move the mouse to the right so that the TOC box appears.
    --> You'll see that the highlighted line in the TOC box is more or less random, it doesn't match with the cursor's position in the text, nor does it match with the header above it.

What should happen?

The selection in the TOC box should match with the cursor position in the text on the canvas.

3 Comments

Sign in to comment

K
Kaye
Kaye·10/29/2026

Thanks for your suggestion. I tested this on other editors and their logic is based on scroll position not caret position. That also makes sense to me, I personally wouldn't want it based on caret.

C
Code-Jack
Code-Jack·10/29/2026

Good argument in principle.
So, I've tested it again after reading your reply,
But even with the logic that you've mentioned, it doesn't work well: the position in the TOC box often doesn't fit to the scroll position in the Page.
There are three issues:

1. The TOC box doesn't scroll to the highlighted entry in it.
--> The user needs to scroll manually to it.
2. Worse then that: the entry in the box that is highlighted represents sometimes a headline that's clearly scrolled out of view in the Page.
3. Also remarkable: if you click an entry in the TOX box, although the Page scrolls to the correct position, the box highlights in itself an entry that's in most cases two positions below the clicked entry.

I've tested it with a long Page with some open and some closed Toggles. I've tried multiple times different positions on top; on bottom, and somewhere in the middle.
Summary:
The highlight position in the box box (as well as the scroll position in it) doesn't fit well to the scroll position in the Page.
And unfortunately, it doesn't feel like "there is logic xyz behind that all".
Nope, it simply feels buggy and confusing.

K
Kaye
Kaye·10/29/2026(edited)

Ok, we should definitely test it and make it better. That's a bug more than an improvement. Toggles definitely give us troubles—I saw your other post about it omitting search results.