chore(react): monkey patch boostrap tooltip handling

This commit is contained in:
Elian Doran 2025-09-17 08:47:13 +03:00
parent f87d270caa
commit fbd47025d6
No known key found for this signature in database

View File

@ -536,7 +536,12 @@ export function useStaticTooltip(elRef: RefObject<Element>, config?: Partial<Too
if (!elRef?.current || !hasTooltip) return;
const tooltip = Tooltip.getOrCreateInstance(elRef.current, config);
return () => tooltip.dispose();
return () => {
tooltip.dispose();
// workaround for https://github.com/twbs/bootstrap/issues/37474
(tooltip as any)._activeTrigger = {};
(tooltip as any)._element = document.createElement('noscript'); // placeholder with no behavior
}
}, [ elRef, config ]);
}