From 23403a7ef2935bcd6d4d9de2a5b1f45c279a97ad Mon Sep 17 00:00:00 2001 From: Mathias Jakobsen Date: Mon, 7 Jul 2025 12:17:45 +0100 Subject: [PATCH] Merge pull request #26771 from overleaf/td-tooltip-click-trigger Make OLTooltip with click trigger work GitOrigin-RevId: e4b976255dd514af0cfa199b9bd6815b3a8a09ef --- .../js/features/ui/components/bootstrap-5/tooltip.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/services/web/frontend/js/features/ui/components/bootstrap-5/tooltip.tsx b/services/web/frontend/js/features/ui/components/bootstrap-5/tooltip.tsx index ac7dcb3858..5582a00ca7 100644 --- a/services/web/frontend/js/features/ui/components/bootstrap-5/tooltip.tsx +++ b/services/web/frontend/js/features/ui/components/bootstrap-5/tooltip.tsx @@ -100,9 +100,11 @@ function Tooltip({ show={show} onToggle={setShow} > - {cloneElement(children, { - onClick: callFnsInSequence(children.props.onClick, hideTooltip), - })} + {overlayProps?.trigger === 'click' + ? children + : cloneElement(children, { + onClick: callFnsInSequence(children.props.onClick, hideTooltip), + })} ) }