[WEB-5103] fix: custom menu event propagation (#7932)

* fix: custommenu event propagation

* chore: code refactor
This commit is contained in:
Anmol Singh Bhatia 2025-10-11 15:02:34 +05:30 committed by GitHub
parent 151674687c
commit 2c17f8ad72
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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"