From bebaa81dd52dd61d92faff4197c2bfd976fed58e Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Wed, 14 Jun 2023 10:08:46 +0200 Subject: [PATCH] fix thread quote refs --- src/components/views/Thread.jsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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;