Add tooltip delay and fix stuck tooltips.

This commit is contained in:
MaxJa4
2024-01-27 13:56:34 +01:00
parent 745b44eb10
commit 866ff65eac

View File

@@ -5,7 +5,11 @@ document.addEventListener('DOMContentLoaded', function() {
function initTooltips(elementRoot) {
const tooltipTriggerList = elementRoot.querySelectorAll('[data-bs-action="tooltip"]');
tooltipTriggerList.forEach((elem) => {
new bootstrap.Tooltip(elem);
new bootstrap.Tooltip(elem, {
trigger: 'hover',
delay: {show: 1000, hide: 0},
container: 'body'
});
});
}