Composer: Fix stuck Symbol Menu (#1554)

This commit is contained in:
Alexander Zinchuk 2021-11-19 17:26:15 +03:00
parent f07d4f1eb7
commit 58d251b67e

View File

@ -8,13 +8,7 @@ let closeTimeout: number | undefined;
export default function useMouseInside(
isOpen: boolean, onClose: NoneToVoidFunction, menuCloseTimeout = MENU_CLOSE_TIMEOUT, isDisabled = false,
) {
const isMouseInside = useRef(true);
useEffect(() => {
if (isOpen) {
isMouseInside.current = true;
}
}, [isOpen]);
const isMouseInside = useRef(false);
useEffect(() => {
if (closeTimeout) {