From 0db581509cb5ef3ffdbe9f992ef9b7a31322d103 Mon Sep 17 00:00:00 2001 From: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com> Date: Wed, 2 Apr 2025 17:35:04 +0530 Subject: [PATCH] [WEB-3745] fix: color picker event propagation (#6859) --- packages/ui/src/color-picker/color-picker.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/ui/src/color-picker/color-picker.tsx b/packages/ui/src/color-picker/color-picker.tsx index 73616a992..e53fdc10d 100644 --- a/packages/ui/src/color-picker/color-picker.tsx +++ b/packages/ui/src/color-picker/color-picker.tsx @@ -12,7 +12,9 @@ export const ColorPicker: React.FC = (props) => { const inputRef = React.useRef(null); // handlers - const handleOnClick = () => { + const handleOnClick = (e: React.MouseEvent) => { + e.stopPropagation(); + e.preventDefault(); inputRef.current?.click(); };