Skip to content

Commit 356e34a

Browse files
authored
[BUGFIX] Fix scrolling behavior (#976)
1 parent c310707 commit 356e34a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/typo3-docs-theme/assets/js/scrolling.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ document.addEventListener("DOMContentLoaded", function () {
44
const headerHeight = header ? header.offsetHeight : 80; // Default fallback
55

66
document.querySelectorAll("[id]").forEach(el => {
7-
section.style.scrollMarginTop = `${headerHeight + 10}px`; // Extra space for visibility
7+
el.style.scrollMarginTop = `${headerHeight + 10}px`;
88
});
99
}
1010

0 commit comments

Comments
 (0)