From eca35d832b4e0e49abf4eef03b8519f22b8dcdc4 Mon Sep 17 00:00:00 2001 From: Vivek Thuravupala Date: Wed, 11 Dec 2024 13:50:20 -0800 Subject: [PATCH] fix: interactivity for components within tooltip body [INS-4773] (#8239) Attempting to click on links within tooltips would lead to the tooltip being dismissed. 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 && (
{
)} -
+ ); };