Closed kareem closed 1 year ago
Hey, glad you like tocbot, thanks for the praise!
And thanks for your thorough example / explanation of the problem. Lol, this is very weird and at first I saw this and thought oh well you can't do overflow-y hidden on the root elements. But then I noticed you had overflow-x: hidden
which seems like it should be fine because it keeps the main root element scrollable (y-axis) which is needed for the native browser handling of hash urls to work (which tocbot works with / uses too). Anyway, suffice to say I think if you can just change html, body { overflow-x:hidden }
to body { overflow-x:hidden }
that should work. Let me know if it does / doesn't work for you. This is a very weird issue and also weird that it happens in firefox too. Anyway, hope that fix works!
Hey, did this help resolve the issue?
sorry on vacation right now - emailed you on the plane over. will take a look at it this week, really appreciate the quick reply, thanks! 🙏
change
html, body { overflow-x:hidden }
tobody { overflow-x:hidden }
that should work
This did indeed work! Thanks! I'm not sure I fully understand why it does, though. Are you able to share why that works?
Thank you so much @tscanlin!
Glad that worked!
I'm not really sure why exactly it works, but seems to be a weird browser issue, see here for more workarounds: https://stackoverflow.com/questions/47095596/body-overflow-x-hidden-breaks-position-sticky
also this has more info: https://stackoverflow.com/a/44929597/1655810
Great plugin, thanks for all your hard work on it!
Like the title says: when I click or scroll to a header, the corresponding tocbot
li
doesn't haveis-active-li
added to it.Couple interesting things:
is-active-li
added to ittocbot.refresh()
from the console, the relevant tocbotli
does getis-active-li
added to itExample page: https://www.savio.io/blog/examples-of-content-feedback/
Code: