From 9eb4746db98acdf0a4d3bd9f067ae6a9e35ddbda Mon Sep 17 00:00:00 2001 From: melloware Date: Wed, 17 Jan 2024 08:49:21 -0500 Subject: [PATCH] Fix #5785: Menu URL handling --- components/lib/menu/Menu.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/components/lib/menu/Menu.js b/components/lib/menu/Menu.js index 8ea7534032..9a0fb55e2a 100644 --- a/components/lib/menu/Menu.js +++ b/components/lib/menu/Menu.js @@ -69,10 +69,6 @@ export const Menu = React.memo( return; } - if (item.url) { - return; - } - if (item.command) { item.command({ originalEvent: event, @@ -88,8 +84,10 @@ export const Menu = React.memo( setFocusedOptionIndex(key); } - event.preventDefault(); - event.stopPropagation(); + if (!item.url) { + event.preventDefault(); + event.stopPropagation(); + } }; const onListFocus = (event) => {