Merge branch 'color-picker' into 'develop'

Fix color picker closing on toggle

See merge request soapbox-pub/soapbox-fe!1653
This commit is contained in:
marcin mikołajczak 2022-07-19 05:11:51 +00:00
commit 87e39f52e6

View file

@ -28,12 +28,14 @@ const ColorWithPicker: React.FC<IColorWithPicker> = ({ buttonId, value, onChange
setPlacement(isMobile(window.innerWidth) ? 'bottom' : 'right'); setPlacement(isMobile(window.innerWidth) ? 'bottom' : 'right');
}; };
const onToggle: React.MouseEventHandler = () => { const onToggle: React.MouseEventHandler = (e) => {
if (active) { if (active) {
hidePicker(); hidePicker();
} else { } else {
showPicker(); showPicker();
} }
e.stopPropagation();
}; };
return ( return (