From f182cf4a099ddc06942fdee3dd0f01355dd49ebc Mon Sep 17 00:00:00 2001 From: yangdx Date: Thu, 27 Mar 2025 16:55:15 +0800 Subject: [PATCH] Fix liting --- lightrag_webui/src/features/DocumentManager.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lightrag_webui/src/features/DocumentManager.tsx b/lightrag_webui/src/features/DocumentManager.tsx index 612cf5c8..b5b1be26 100644 --- a/lightrag_webui/src/features/DocumentManager.tsx +++ b/lightrag_webui/src/features/DocumentManager.tsx @@ -211,17 +211,17 @@ export default function DocumentManager() { const positionTooltips = () => { // Get all tooltip containers const containers = document.querySelectorAll('.tooltip-container'); - + containers.forEach(container => { const tooltip = container.querySelector('.tooltip'); if (!tooltip) return; - + // Only position visible tooltips if (getComputedStyle(tooltip).visibility === 'hidden') return; - + // Get container position const rect = container.getBoundingClientRect(); - + // Position tooltip above the container tooltip.style.left = `${rect.left}px`; tooltip.style.top = `${rect.top - 5}px`; @@ -235,13 +235,13 @@ export default function DocumentManager() { const target = e.target as HTMLElement; const container = target.closest('.tooltip-container'); if (!container) return; - + // Small delay to ensure tooltip is visible before positioning setTimeout(positionTooltips, 10); }; - + document.addEventListener('mouseover', handleMouseOver); - + return () => { document.removeEventListener('mouseover', handleMouseOver); };