Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
chore(react): monkey patch boostrap tooltip handling
Elian Doranfbd47025d63a
diff --git a/apps/client/src/widgets/react/hooks.tsx b/apps/client/src/widgets/react/hooks.tsxindex 9e6991f084..6a4b4ab154 100644--- a/apps/client/src/widgets/react/hooks.tsx+++ b/apps/client/src/widgets/react/hooks.tsx@@ -536,7 +536,12 @@ export function useStaticTooltip(elRef: RefObject<Element>, config?: Partial<Tooif (!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 ]);}