Page MenuHomePhabricator

D4910.id16052.diff
No OneTemporary

D4910.id16052.diff

diff --git a/web/chat/tooltip-provider.js b/web/chat/tooltip-provider.js
--- a/web/chat/tooltip-provider.js
+++ b/web/chat/tooltip-provider.js
@@ -6,6 +6,7 @@
import type { TooltipPositionStyle } from './tooltip-utils';
const onMouseLeaveSourceDisappearTimeoutMs = 200;
+const onMouseLeaveTooltipDisappearTimeoutMs = 100;
export type RenderTooltipParams = {
+newNode: React.Node,
@@ -96,10 +97,20 @@
);
// eslint-disable-next-line no-unused-vars
- const onMouseEnterTooltip = React.useCallback(() => {}, []);
+ const onMouseEnterTooltip = React.useCallback(() => {
+ if (tooltipSymbol.current) {
+ clearTimeout(tooltipCancelTimer.current);
+ }
+ }, []);
// eslint-disable-next-line no-unused-vars
- const onMouseLeaveTooltip = React.useCallback(() => {}, []);
+ const onMouseLeaveTooltip = React.useCallback(() => {
+ const timer = setTimeout(
+ clearCurrentTooltip,
+ onMouseLeaveTooltipDisappearTimeoutMs,
+ );
+ tooltipCancelTimer.current = timer;
+ }, [clearCurrentTooltip]);
const tooltip = React.useMemo(() => {}, []);

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 23, 1:04 PM (18 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2569843
Default Alt Text
D4910.id16052.diff (1 KB)

Event Timeline