Skip to content

Commit

Permalink
Merge pull request #52291 from tscanlin/ts--scroll-sync-fixes
Browse files Browse the repository at this point in the history
fixes for scroll sync behavior
  • Loading branch information
quinthar authored Nov 9, 2024
2 parents aaa56a6 + db79826 commit b821068
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion help/_layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@
box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
}

.toc-link::before {
display: none;
}

.toc-sidebar ul {
list-style: none;
padding-left: 0;
Expand Down Expand Up @@ -325,7 +329,7 @@ <h3>Get Started</h3>
</div>
</footer>

<script src="https://cdnjs.cloudflare.com/ajax/libs/tocbot/4.27.4/tocbot.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tocbot/4.32.1/tocbot.min.js"></script>
<script>
function updateURLHashOnScroll() {
const activeLink = document.querySelector('.toc-sidebar .is-active-link');
Expand Down Expand Up @@ -360,6 +364,8 @@ <h3>Get Started</h3>
enableUrlHashUpdateOnScroll: false,
headingsOffset: 80,
scrollSmoothOffset: -80,
tocScrollingWrapper: document.querySelector('.toc-sidebar'),
tocScrollOffset: 80,
headingObjectCallback: function(obj, element) {
const tocTitle = element.getAttribute('data-toc-title');
if (tocTitle) {
Expand Down

0 comments on commit b821068

Please sign in to comment.