Fixed toolip
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user