Skip to content

Commit

Permalink
Fix docs nav button resetting scroll position
Browse files Browse the repository at this point in the history
nanaya committed Jan 28, 2025
1 parent f4646be commit 212bfc4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion resources/js/docs/sidebar-toggle.ts
Original file line number Diff line number Diff line change
@@ -19,7 +19,8 @@ export default class SidebarToggle {
this.navButton.addEventListener('click', this.onClickNavButton);
}

private readonly onClickNavButton = () => {
private readonly onClickNavButton = (e: MouseEvent) => {
e.preventDefault();
this.menuWrapper.classList.toggle('open');
this.navButton.classList.toggle('open');
};

0 comments on commit 212bfc4

Please sign in to comment.