From 866ff65eac37e82f98e6bb480cbffcc9a5e9faea Mon Sep 17 00:00:00 2001 From: MaxJa4 <74194322+MaxJa4@users.noreply.github.com> Date: Sat, 27 Jan 2024 13:56:34 +0100 Subject: [PATCH] Add tooltip delay and fix stuck tooltips. --- static/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/static/index.js b/static/index.js index b838a7d..99a7ded 100644 --- a/static/index.js +++ b/static/index.js @@ -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' + }); }); }