diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2025-10-06 15:23:25 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2025-10-06 15:23:25 -0300 |
commit | 6a99486d361b1fb8af6be08cb9c1adbbcd0b0e8f (patch) | |
tree | 21e457e2a3b168c6e257c8f5209aef3be89ad508 /src/static/js/client/sticky-heading.js | |
parent | f820d83e94cf014e34857c69598261680c72329c (diff) |
content, client: memorable details, collapsed crediting/ref sources preview
Diffstat (limited to 'src/static/js/client/sticky-heading.js')
-rw-r--r-- | src/static/js/client/sticky-heading.js | 4 |
1 files changed, 4 insertions, 0 deletions
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; |