mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-26 14:37:52 +02:00
fix(v2): prevent click on item menu with children on mobiles (#4189)
This commit is contained in:
parent
174b4200ee
commit
cfeadbf824
1 changed files with 2 additions and 1 deletions
|
@ -192,7 +192,8 @@ function NavItemMobile({
|
|||
role="button"
|
||||
className={navLinkClassNames(className, true)}
|
||||
{...props}
|
||||
onClick={() => {
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
setCollapsed((state) => !state);
|
||||
}}>
|
||||
{props.children ?? props.label}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue