mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
client: Make sure tooltips cannot overlap (fixes #375)
This commit is contained in:
parent
607af4b8fc
commit
84efc13b52
@ -16,10 +16,14 @@ function setupGlobalTooltip() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$('.note-tooltip').remove();
|
cleanUpTooltips;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function cleanUpTooltips() {
|
||||||
|
$('.note-tooltip').remove();
|
||||||
|
}
|
||||||
|
|
||||||
function setupElementTooltip($el) {
|
function setupElementTooltip($el) {
|
||||||
$el.on('mouseenter', mouseEnterHandler);
|
$el.on('mouseenter', mouseEnterHandler);
|
||||||
}
|
}
|
||||||
@ -85,6 +89,7 @@ async function mouseEnterHandler() {
|
|||||||
customClass: linkId
|
customClass: linkId
|
||||||
});
|
});
|
||||||
|
|
||||||
|
cleanUpTooltips();
|
||||||
$(this).tooltip('show');
|
$(this).tooltip('show');
|
||||||
|
|
||||||
// Dismiss the tooltip immediately if a link was clicked inside the tooltip.
|
// Dismiss the tooltip immediately if a link was clicked inside the tooltip.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user