From f604b3b7c8864f700415b90ca93e597b08349dbd Mon Sep 17 00:00:00 2001 From: melloware Date: Mon, 25 Sep 2023 08:20:41 -0400 Subject: [PATCH] Fix #4956: Megmenu allow URL to be top level submenu --- components/lib/megamenu/MegaMenu.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/lib/megamenu/MegaMenu.js b/components/lib/megamenu/MegaMenu.js index a6a6e0b3c1..000c1a867c 100644 --- a/components/lib/megamenu/MegaMenu.js +++ b/components/lib/megamenu/MegaMenu.js @@ -116,13 +116,13 @@ export const MegaMenu = React.memo( originalEvent: event, item: props.item }); + event.preventDefault(); } if (item.items) { activeItemState && activeItemState === item ? setActiveItemState(null) : setActiveItemState(item); + event.preventDefault(); } - - event.preventDefault(); }; const onCategoryKeyDown = (event, item) => {