From 58d251b67e62ee56d6d11cd46ea63d8e405eb2f8 Mon Sep 17 00:00:00 2001 From: Alexander Zinchuk Date: Fri, 19 Nov 2021 17:26:15 +0300 Subject: [PATCH] Composer: Fix stuck Symbol Menu (#1554) --- src/hooks/useMouseInside.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/hooks/useMouseInside.ts b/src/hooks/useMouseInside.ts index 32107f45..1d2ee722 100644 --- a/src/hooks/useMouseInside.ts +++ b/src/hooks/useMouseInside.ts @@ -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) {