MCPcopy Create free account
hub / github.com/dailydotdev/apps / onUntrigger

Function onUntrigger

packages/shared/src/components/tooltips/SimpleTooltip.tsx:57–69  ·  view source on GitHub ↗
(_inst: TippyInstance, event: Event)

Source from the content-addressed store, hash-verified

55 };
56
57 const onUntrigger = (_inst: TippyInstance, event: Event) => {
58 const eventPath =
59 (event as Event & { path?: EventTarget[] }).path ||
60 event.composedPath?.();
61 const bodyPath = eventPath.filter(
62 (path: EventTarget) => document.body === path,
63 )[0];
64 if ((bodyPath as HTMLElement)?.className === 'ReactModal__Body--open') {
65 shouldShow = false;
66 return;
67 }
68 shouldShow = true;
69 };
70
71 const onTooltipShow = (inst: TippyInstance) => {
72 if (shouldShow) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected