fixed the Tooltip positioning issue:

- Changed all Tooltip position styles from fixed to absolute
- Maintained the position: relative on parent elements (already present in the group relative class)
This commit is contained in:
yangdx
2025-03-26 23:49:14 +08:00
parent ebe7620b5f
commit e7f68f7b77

View File

@@ -284,7 +284,7 @@ export default function DocumentManager() {
<div className="truncate"> <div className="truncate">
{getDisplayFileName(doc, 35)} {getDisplayFileName(doc, 35)}
</div> </div>
<div className="invisible group-hover:visible fixed z-[9999] mt-1 max-w-[800px] whitespace-normal break-all rounded-md bg-black/95 px-3 py-2 text-sm text-white shadow-lg dark:bg-white/95 dark:text-black"> <div className="invisible group-hover:visible absolute z-[9999] mt-1 max-w-[800px] whitespace-normal break-all rounded-md bg-black/95 px-3 py-2 text-sm text-white shadow-lg dark:bg-white/95 dark:text-black">
{doc.file_path} {doc.file_path}
</div> </div>
</div> </div>
@@ -295,7 +295,7 @@ export default function DocumentManager() {
<div className="truncate"> <div className="truncate">
{doc.id} {doc.id}
</div> </div>
<div className="invisible group-hover:visible fixed z-[9999] mt-1 max-w-[800px] whitespace-normal break-all rounded-md bg-black/95 px-3 py-2 text-sm text-white shadow-lg dark:bg-white/95 dark:text-black"> <div className="invisible group-hover:visible absolute z-[9999] mt-1 max-w-[800px] whitespace-normal break-all rounded-md bg-black/95 px-3 py-2 text-sm text-white shadow-lg dark:bg-white/95 dark:text-black">
{doc.file_path} {doc.file_path}
</div> </div>
</div> </div>
@@ -306,7 +306,7 @@ export default function DocumentManager() {
<div className="truncate"> <div className="truncate">
{doc.content_summary} {doc.content_summary}
</div> </div>
<div className="invisible group-hover:visible fixed z-[9999] mt-1 max-w-[800px] whitespace-normal break-all rounded-md bg-black/95 px-3 py-2 text-sm text-white shadow-lg dark:bg-white/95 dark:text-black"> <div className="invisible group-hover:visible absolute z-[9999] mt-1 max-w-[800px] whitespace-normal break-all rounded-md bg-black/95 px-3 py-2 text-sm text-white shadow-lg dark:bg-white/95 dark:text-black">
{doc.content_summary} {doc.content_summary}
</div> </div>
</div> </div>