diff --git a/src/common/ColorInput/ColorInput.js b/src/common/ColorInput/ColorInput.js index a7d5f4b29..d6a3726a0 100644 --- a/src/common/ColorInput/ColorInput.js +++ b/src/common/ColorInput/ColorInput.js @@ -22,23 +22,19 @@ const ColorInput = ({ className, value, onChange }) => { }, [value, colorInputVisible]); const modalBackgroundOnClick = React.useCallback((event) => { - if (!event.nativeEvent.preventClose) { + if(event.target === event.currentTarget) { closeColorInput(); } }, []); - const modalContentOnClick = React.useCallback((event) => { - event.nativeEvent.preventClose = true; - }, []); - return ( { colorInputVisible ? - -
+ +