fix: усовершенствовать события мыши для стабильного показа тултипа на всех строках
Build and deploy / build-deploy (push) Has been cancelled

This commit is contained in:
2026-10-22 09:44:52 +00:00
parent 59dfb5890f
commit 3da33c9716
+5 -1
View File
@@ -383,10 +383,14 @@ document.addEventListener('mouseover', e => {
if (seg) { if (seg) {
const targetSeg = seg.classList.contains('uptime-seg') ? seg : seg.querySelector('.uptime-seg[data-seg]'); const targetSeg = seg.classList.contains('uptime-seg') ? seg : seg.querySelector('.uptime-seg[data-seg]');
if (targetSeg) showSegTip(targetSeg); if (targetSeg) showSegTip(targetSeg);
} else {
hideSegTip();
} }
}); });
document.addEventListener('mouseout', e => { document.addEventListener('mouseout', e => {
if (e.target.closest('.uptime-seg[data-seg]') || e.target.closest('.uptime-segs')) hideSegTip(); if (!e.relatedTarget || !e.relatedTarget.closest('.seg-tip')) {
if (e.target.closest('.uptime-seg[data-seg]') || e.target.closest('.uptime-segs')) hideSegTip();
}
}); });
document.addEventListener('scroll', hideSegTip, true); document.addEventListener('scroll', hideSegTip, true);