Fixed toolip

This commit is contained in:
2026-01-21 21:07:11 +01:00
parent 346b9632c6
commit ca40333742
2 changed files with 5 additions and 3 deletions

View File

@@ -190,7 +190,7 @@ function bindTooltipsWithDelegation(elementId) {
// Add a single mouseenter and mouseleave listener to the parent element
element.addEventListener("mouseenter", (event) => {
// OPTIMIZATION C: Early exit - check mf-no-tooltip FIRST (before any DOM work)
// Early exit - check mf-no-tooltip FIRST (before any DOM work)
if (element.hasAttribute("mf-no-tooltip")) {
return;
}
@@ -243,14 +243,14 @@ function bindTooltipsWithDelegation(elementId) {
}
}
});
}); // OPTIMIZATION C: Removed capture phase (not needed)
}, true); // Capture phase required: mouseenter doesn't bubble
element.addEventListener("mouseleave", (event) => {
const cell = event.target.closest("[data-tooltip]");
if (cell) {
tooltipContainer.setAttribute("data-visible", "false");
}
}); // OPTIMIZATION C: Removed capture phase (not needed)
}, true); // Capture phase required: mouseleave doesn't bubble
}
function initLayout(elementId) {