diff --git a/src/components/views/Thread.jsx b/src/components/views/Thread.jsx index 495d3ce8..dc41bba9 100755 --- a/src/components/views/Thread.jsx +++ b/src/components/views/Thread.jsx @@ -1268,14 +1268,14 @@ const Thread = () => {
{}} key={`r-pm-${index}`} className="quotelink" ref={el => { - quoteRefs.current[shortParentCid] = el; + quoteRefs.current[reply.cid] = el; }} onClick={(event) => handleQuoteClick(reply, shortParentCid, event)} onMouseOver={(event) => { event.stopPropagation(); handleQuoteHover(reply, shortParentCid, () => { setOutOfViewCid(reply.parentCid); - const rect = quoteRefs.current[shortParentCid].getBoundingClientRect(); + const rect = quoteRefs.current[reply.cid].getBoundingClientRect(); const distanceToRight = window.innerWidth - rect.right; const distanceToTop = rect.top; const distanceToBottom = window.innerHeight - rect.bottom; @@ -1551,14 +1551,14 @@ const Thread = () => {{ - quoteRefsMobile.current[shortParentCid] = el; + quoteRefsMobile.current[reply.cid] = el; }} onClick={(event) => handleQuoteClick(reply, shortParentCid, event)} onMouseOver={(event) => { event.stopPropagation(); handleQuoteHover(reply, shortParentCid, () => { setOutOfViewCid(reply.parentCid); - const rect = quoteRefsMobile.current[shortParentCid].getBoundingClientRect(); + const rect = quoteRefsMobile.current[reply.cid].getBoundingClientRect(); const distanceToRight = window.innerWidth - rect.right; const distanceToTop = rect.top; const distanceToBottom = window.innerHeight - rect.bottom;