mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-26 22:47:49 +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"
|
role="button"
|
||||||
className={navLinkClassNames(className, true)}
|
className={navLinkClassNames(className, true)}
|
||||||
{...props}
|
{...props}
|
||||||
onClick={() => {
|
onClick={(e) => {
|
||||||
|
e.preventDefault();
|
||||||
setCollapsed((state) => !state);
|
setCollapsed((state) => !state);
|
||||||
}}>
|
}}>
|
||||||
{props.children ?? props.label}
|
{props.children ?? props.label}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue