Skip to content

Commit

Permalink
Merge pull request #485 from art-institute-of-chicago/fix/toc-jumping…
Browse files Browse the repository at this point in the history
…-in-sidebar

Fix TOC jumping in sidebar
  • Loading branch information
nikhiltri authored Aug 22, 2024
2 parents 31ed970 + 15cfbc4 commit 77688c8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function show($pubId, $pubSlug, $id, $slug = null)
'item' => $item,
'contrastHeader' => false,
'borderlessHeader' => false,
'unstickyHeader' => false,
'unstickyHeader' => true,
'canonicalUrl' => $canonicalPath,
]);
}
Expand Down
2 changes: 1 addition & 1 deletion frontend/js/behaviors/core/stickySidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const stickySidebar = function(container){
bottom();
} else {
sticky();
container.style.marginTop = ((!document.documentElement.classList.contains('s-unsticky-header') ? navContainer.clientHeight : 0) + (!document.documentElement.classList.contains('s-unsticky-digital-publication-header') ? stickyHeaderContainer.clientHeight : 0)) + 'px';
container.style.marginTop = (document.documentElement.classList.contains('p-digitalpublicationarticle-show') ? 0 : (!document.documentElement.classList.contains('s-unsticky-header') ? navContainer.clientHeight : 0) + (!document.documentElement.classList.contains('s-unsticky-digital-publication-header') ? stickyHeaderContainer.clientHeight : 0)) + 'px';
}
}
}
Expand Down

0 comments on commit 77688c8

Please sign in to comment.