Skip to content

Commit

Permalink
Merge pull request #11825 from nanaya/docs-nav-button
Browse files Browse the repository at this point in the history
Fix docs nav button resetting scroll position
  • Loading branch information
notbakaneko authored Jan 28, 2025
2 parents d470f0c + a60065f commit 3b506e5
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
Expand Up @@ -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');
};
Expand Down

0 comments on commit 3b506e5

Please sign in to comment.