From 13681a185f46237663ff244fabf6f9e64a7cc35d Mon Sep 17 00:00:00 2001 From: yangdx Date: Wed, 17 Sep 2025 02:04:43 +0800 Subject: [PATCH] Fix tooltip text wrapping to preserve word boundaries MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Change break-all to break-word • Add overflow-wrap: break-word • Apply to tooltip and pre elements --- lightrag_webui/src/features/DocumentManager.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lightrag_webui/src/features/DocumentManager.tsx b/lightrag_webui/src/features/DocumentManager.tsx index 31a37b13..b72f7082 100644 --- a/lightrag_webui/src/features/DocumentManager.tsx +++ b/lightrag_webui/src/features/DocumentManager.tsx @@ -91,7 +91,8 @@ const pulseStyle = ` z-index: 9999; /* Ensure tooltip appears above all other elements */ max-width: 600px; white-space: normal; - word-break: break-all; + word-break: break-word; + overflow-wrap: break-word; border-radius: 0.375rem; padding: 0.5rem 0.75rem; font-size: 0.75rem; /* 12px */ @@ -116,7 +117,8 @@ const pulseStyle = ` .tooltip pre { white-space: pre-wrap; - word-break: break-all; + word-break: break-word; + overflow-wrap: break-word; } /* Position tooltip helper class */