tscanlin / tocbot

Build a table of contents from headings in an HTML document.
MIT License
1.37k stars 114 forks source link

Tocbot scrolls to the right position onClick but highlighting doesn't seem to show the active section #334

Closed tatiana-kushnir-89 closed 3 months ago

tatiana-kushnir-89 commented 3 months ago

I encountered this problem and the solution from here did not help me. Are there any other possible ways to solve this bug?

tscanlin commented 3 months ago

Hmm, sorry to hear that. Can you please post an example somewhere that shows the issue so I can try to see what is happening?

tatiana-kushnir-89 commented 3 months ago

can I send you a link to my test project more privately? maybe by email? In the context of my project, it will not be possible to take a separate part of code and place it

So I can send you a link to my example, and here I can attach part of my code with settings

tscanlin commented 3 months ago

Yeah I understand that, I emailed you. Can you also include a screenshot in your email incase I have any issues getting it setup? Thanks!

tatiana-kushnir-89 commented 3 months ago

Tim explained that I also need the options hasInnerContainers: true, headingsOffset: 100, scrollSmoothOffset: -100, this affects the margins in the second-level lists in my case.

Thanks again to the Toсbot developer for such a useful plugin)