diff options
Diffstat (limited to 'src/static')
-rw-r--r-- | src/static/js/client/sticky-heading.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/static/js/client/sticky-heading.js b/src/static/js/client/sticky-heading.js index 1fa131d6..1020cab3 100644 --- a/src/static/js/client/sticky-heading.js +++ b/src/static/js/client/sticky-heading.js @@ -233,9 +233,10 @@ function getContentHeadingClosestToStickySubheading(index) { // so the used bottom edge should always be *as though* it's only // displaying one line of text. Subtract the current discrepancy. const stickyHeading = info.stickyHeadings[index]; + const referenceCollapsedHeading = info.referenceCollapsedHeading[index]; const correctBottomEdge = stickyHeading.getBoundingClientRect().height - - parseFloat(getComputedStyle(stickyHeading).fontSize); + referenceCollapsedHeading.getBoundingClientRect().height; const stickyBottom = (stickyRect.bottom |