Symbol Menu: Fix opening on several touch screens (#2110)
This commit is contained in:
parent
fc50ce5675
commit
47a6cf312c
@ -126,6 +126,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.bubble {
|
.bubble {
|
||||||
|
--offset-y: 4rem;
|
||||||
|
|
||||||
width: calc(var(--symbol-menu-width) + 0.25rem); // Reserve width for scrollbar
|
width: calc(var(--symbol-menu-width) + 0.25rem); // Reserve width for scrollbar
|
||||||
padding: 0;
|
padding: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|||||||
@ -46,13 +46,18 @@ const ResponsiveHoverButton: FC<OwnProps> = ({ onActivate, ...buttonProps }) =>
|
|||||||
isMouseInside.current = false;
|
isMouseInside.current = false;
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
const handleClick = useCallback(() => {
|
||||||
|
isMouseInside.current = true;
|
||||||
|
onActivate();
|
||||||
|
}, [onActivate]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Button
|
<Button
|
||||||
// eslint-disable-next-line react/jsx-props-no-spreading
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
||||||
{...buttonProps}
|
{...buttonProps}
|
||||||
onMouseEnter={!IS_TOUCH_ENV ? handleMouseEnter : undefined}
|
onMouseEnter={!IS_TOUCH_ENV ? handleMouseEnter : undefined}
|
||||||
onMouseLeave={!IS_TOUCH_ENV ? handleMouseLeave : undefined}
|
onMouseLeave={!IS_TOUCH_ENV ? handleMouseLeave : undefined}
|
||||||
onClick={onActivate}
|
onClick={!IS_TOUCH_ENV ? onActivate : handleClick}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user