Skip to content

Commit

Permalink
Fix #5785: Menu URL handling (#5793)
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware authored Jan 17, 2024
1 parent f1f32ff commit e3d0a0f
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions components/lib/menu/Menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,6 @@ export const Menu = React.memo(
return;
}

if (item.url) {
return;
}

if (item.command) {
item.command({
originalEvent: event,
Expand All @@ -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) => {
Expand Down

0 comments on commit e3d0a0f

Please sign in to comment.