mirror of
https://github.com/danog/telegram-tt.git
synced 2025-01-22 05:11:55 +01:00
Composer: Fix stuck Symbol Menu (#1554)
This commit is contained in:
parent
f07d4f1eb7
commit
58d251b67e
@ -8,13 +8,7 @@ let closeTimeout: number | undefined;
|
|||||||
export default function useMouseInside(
|
export default function useMouseInside(
|
||||||
isOpen: boolean, onClose: NoneToVoidFunction, menuCloseTimeout = MENU_CLOSE_TIMEOUT, isDisabled = false,
|
isOpen: boolean, onClose: NoneToVoidFunction, menuCloseTimeout = MENU_CLOSE_TIMEOUT, isDisabled = false,
|
||||||
) {
|
) {
|
||||||
const isMouseInside = useRef(true);
|
const isMouseInside = useRef(false);
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (isOpen) {
|
|
||||||
isMouseInside.current = true;
|
|
||||||
}
|
|
||||||
}, [isOpen]);
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (closeTimeout) {
|
if (closeTimeout) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user