From 2c17f8ad72d3f497d30d3d469c4b087c25522b19 Mon Sep 17 00:00:00 2001 From: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com> Date: Sat, 11 Oct 2025 15:02:34 +0530 Subject: [PATCH] [WEB-5103] fix: custom menu event propagation (#7932) * fix: custommenu event propagation * chore: code refactor --- packages/ui/src/dropdowns/custom-menu.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/ui/src/dropdowns/custom-menu.tsx b/packages/ui/src/dropdowns/custom-menu.tsx index 00ed3f4af..10a33dcfa 100644 --- a/packages/ui/src/dropdowns/custom-menu.tsx +++ b/packages/ui/src/dropdowns/custom-menu.tsx @@ -222,7 +222,11 @@ const CustomMenu = (props: ICustomMenuDropdownProps) => { tabIndex={tabIndex} className={cn("relative w-min text-left", className)} onKeyDownCapture={handleKeyDown} - onClick={handleOnClick} + onClick={(e) => { + e.stopPropagation(); + e.preventDefault(); + handleOnClick(); + }} onMouseEnter={handleMouseEnter} onMouseLeave={handleMouseLeave} data-main-menu="true"