Skip to content

Commit

Permalink
fix for automaticscrollspy offset for navigations outside of headers
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-c-woodard committed Dec 16, 2024
1 parent 78865d9 commit 975fdec
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion includes/assets/js/kb-navigation-block.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions src/assets/js/kb-navigation-block.js
Original file line number Diff line number Diff line change
Expand Up @@ -466,9 +466,11 @@
navClass: 'current-menu-item',
offset: offsetManual
? offsetManual
: function () {
: offsetTarget
? function () {
return offsetTarget?.getBoundingClientRect().height;
},
}
: 0,
});
});
}
Expand Down

0 comments on commit 975fdec

Please sign in to comment.