diff --git a/app/static/index.html b/app/static/index.html index 87b99a0..0cd2f1c 100644 --- a/app/static/index.html +++ b/app/static/index.html @@ -379,11 +379,14 @@ function escapeHtml(s) { // Делегирование: тултип на весь контейнер сегментов. document.addEventListener('mouseover', e => { - const seg = e.target.closest('.uptime-seg[data-seg]'); - if (seg) showSegTip(seg); + const seg = e.target.closest('.uptime-seg[data-seg]') || e.target.closest('.uptime-segs'); + if (seg) { + const targetSeg = seg.classList.contains('uptime-seg') ? seg : seg.querySelector('.uptime-seg[data-seg]'); + if (targetSeg) showSegTip(targetSeg); + } }); document.addEventListener('mouseout', e => { - if (e.target.closest('.uptime-seg[data-seg]')) hideSegTip(); + if (e.target.closest('.uptime-seg[data-seg]') || e.target.closest('.uptime-segs')) hideSegTip(); }); document.addEventListener('scroll', hideSegTip, true);