Skip to content

Commit

Permalink
Scroll active nav link into view
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisreimann committed May 14, 2024
1 parent d5025e1 commit a0232f2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions BTCPayServer/Components/MainNav/Default.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -397,3 +397,9 @@
</ul>
}
</nav>
<script>
(function () {
const activeEl = document.querySelector('#mainNav .nav-link.active')
if (activeEl) activeEl.scrollIntoView({ block: 'center', inline: 'center' })
})()
</script>

0 comments on commit a0232f2

Please sign in to comment.