From 6a99486d361b1fb8af6be08cb9c1adbbcd0b0e8f Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Mon, 6 Oct 2025 15:23:25 -0300 Subject: content, client: memorable details, collapsed crediting/ref sources --- src/static/js/client/sticky-heading.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/static/js/client/sticky-heading.js') diff --git a/src/static/js/client/sticky-heading.js b/src/static/js/client/sticky-heading.js index b65574d0..4660013a 100644 --- a/src/static/js/client/sticky-heading.js +++ b/src/static/js/client/sticky-heading.js @@ -256,6 +256,10 @@ function getContentHeadingClosestToStickySubheading(index) { // Iterate from bottom to top of the content area. const contentHeadings = info.contentHeadings[index]; for (const heading of contentHeadings.slice().reverse()) { + if (heading.nodeName === 'SUMMARY' && !heading.closest('details').open) { + continue; + } + const headingRect = heading.getBoundingClientRect(); if (headingRect.y + headingRect.height / 1.5 < stickyBottom + 40) { return heading; -- cgit 1.3.0-6-gf8a5