Skip to content

Build your personal knowledge base with Trilium Notes

client: Make sure tooltips cannot overlap (fixes #375)

Elian Doran84efc13b5217
diff --git a/src/public/app/services/note_tooltip.js b/src/public/app/services/note_tooltip.js
index d462b788b2..f6a7dbfdd6 100644
--- a/src/public/app/services/note_tooltip.js
+++ b/src/public/app/services/note_tooltip.js
@@ -16,10 +16,14 @@ function setupGlobalTooltip() {
return;
}
- $('.note-tooltip').remove();
+ cleanUpTooltips;
});
}
+function cleanUpTooltips() {
+ $('.note-tooltip').remove();
+}
+
function setupElementTooltip($el) {
$el.on('mouseenter', mouseEnterHandler);
}
@@ -85,6 +89,7 @@ async function mouseEnterHandler() {
customClass: linkId
});
+ cleanUpTooltips();
$(this).tooltip('show');
// Dismiss the tooltip immediately if a link was clicked inside the tooltip.