mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-05-18 05:05:36 +02:00
* Initial plan * fix: compute heading offsets relative to editor root for correct TOC highlighting Headings inside callout blocks had incorrect `offsetTop` values because `offsetTop` is relative to the nearest positioned ancestor (the callout), not the editor root. This caused the TOC to highlight wrong sections. Fix: walk the `offsetParent` chain from the heading up to the editor content element, accumulating `offsetTop` values to get the correct absolute position within the editor. Co-authored-by: thecodrr <7473959+thecodrr@users.noreply.github.com> * editor: ignore callouts from toc --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: thecodrr <7473959+thecodrr@users.noreply.github.com> Co-authored-by: Abdullah Atta <abdullahatta@streetwriters.co>