We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f7aad09 commit 81db5d6Copy full SHA for 81db5d6
1 file changed
website/js/site.js
@@ -73,7 +73,7 @@
73
item.addEventListener('click', function () {
74
const target = document.getElementById(item.dataset.target)
75
if (!target) return
76
- target.scrollIntoView({ behavior: 'smooth', block: 'start' })
+ mockupContent.scrollTo({ top: target.offsetTop - mockupContent.offsetTop, behavior: 'smooth' })
77
outlineItems.forEach(function (el) { el.classList.remove('active') })
78
item.classList.add('active')
79
})
0 commit comments