Skip to content

Commit 3f08dc3

Browse files
committed
scroll to relevant placefor sidebar expansion
1 parent 80ca067 commit 3f08dc3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

LongevityWorldCup.Website/wwwroot/partials/leaderboard-content.html

+6
Original file line numberDiff line numberDiff line change
@@ -2685,6 +2685,12 @@ <h3>Proofs</h3>
26852685
if (sidebar.classList.contains('expanded')) {
26862686
sidebarToggle.title = "Hide Leagues";
26872687
sidebarToggle.setAttribute('aria-label', 'Hide Sidebar');
2688+
2689+
// Scroll to the leaderboard table when closing the sidebar
2690+
document.querySelector('.search-wrapper .sidebar-toggle').scrollIntoView({
2691+
behavior: 'smooth',
2692+
block: 'start',
2693+
});
26882694
} else {
26892695
sidebarToggle.title = "Show Leagues";
26902696
sidebarToggle.setAttribute('aria-label', 'Show Sidebar');

0 commit comments

Comments
 (0)