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
client: Fix another case of tooltip overlap
Elian Doran9fa31db2077f
diff --git a/src/public/app/services/note_tooltip.js b/src/public/app/services/note_tooltip.jsindex f6a7dbfdd6..3aecc7d8e7 100644--- a/src/public/app/services/note_tooltip.js+++ b/src/public/app/services/note_tooltip.js@@ -16,7 +16,7 @@ function setupGlobalTooltip() {return;}- cleanUpTooltips;+ cleanUpTooltips();});}@@ -94,7 +94,7 @@ async function mouseEnterHandler() {// Dismiss the tooltip immediately if a link was clicked inside the tooltip.$(`.${tooltipClass} a`).on("click", (e) => {- $(this).tooltip('dispose');+ cleanUpTooltips();});// the purpose of the code below is to:@@ -102,15 +102,9 @@ async function mouseEnterHandler() {// click on links within tooltip etc. without tooltip disappearing// - once the user moves the cursor away from both link and the tooltip, hide the tooltipconst checkTooltip = () => {- if (!$(`.${tooltipClass}`).is(':visible')) {- console.log("Not visible anymore");-- return;- }-if (!$(this).filter(":hover").length && !$(`.${linkId}:hover`).length) {// cursor is neither over the link nor over the tooltip, user likely is not interested- $(this).tooltip('dispose');+ cleanUpTooltips();} else {setTimeout(checkTooltip, 1000);}