From ea758641e4c1ab5e0f3c343b6fbbf8fc80a03742 Mon Sep 17 00:00:00 2001 From: Vivek Thuravupala Date: Sat, 7 Dec 2024 09:14:47 -0800 Subject: [PATCH] fix: interactivity for components within tooltip body [INS-4773] Attempting to click in links within tooltips would lead to the tooltip being dismissed earlier. This fixes the issue by moving the tooltip to be a sibling of the tooltip trigger, which is the correct structure for react-aria tooltips. Ref: https://react-spectrum.adobe.com/react-aria/useTooltipTrigger.html --- .../insomnia/src/ui/components/tooltip.tsx | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/packages/insomnia/src/ui/components/tooltip.tsx b/packages/insomnia/src/ui/components/tooltip.tsx index 71fe5c6566d..f7a0419472c 100644 --- a/packages/insomnia/src/ui/components/tooltip.tsx +++ b/packages/insomnia/src/ui/components/tooltip.tsx @@ -49,14 +49,16 @@ export const Tooltip = (props: Props) => { }); return ( -
- {children} + <> +
+ {children} +
{state.isOpen && (
{
)} -
+ ); };