diff --git a/src/components/room/MentionPopover.tsx b/src/components/room/MentionPopover.tsx index 9472f64..2479f34 100644 --- a/src/components/room/MentionPopover.tsx +++ b/src/components/room/MentionPopover.tsx @@ -363,8 +363,6 @@ export function MentionPopover({ cursorSpan.textContent = '|'; clone.appendChild(cursorSpan); document.body.appendChild(clone); - - const cRect = clone.getBoundingClientRect(); document.body.removeChild(clone); const popoverWidth = 320; @@ -377,7 +375,7 @@ export function MentionPopover({ ? contentTop + lineHeight + 8 : Math.max(vp, contentTop - popoverHeight - 8); - setPosition({ top: contentTop + borderTop + lineHeight + 8, left: contentLeft + borderLeft }); + setPosition({ top, left: contentLeft }); document.body.removeChild(tempDiv);