« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/static/js/client/sticky-heading.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/static/js/client/sticky-heading.js')
-rw-r--r--src/static/js/client/sticky-heading.js3
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