mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix thread quote refs
This commit is contained in:
@@ -1268,14 +1268,14 @@ const Thread = () => {
|
||||
<blockquote key={`pm-${index}`} className="post-message">
|
||||
<Link to={() => {}} 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 = () => {
|
||||
<blockquote key={`mob-pm-${index}`} className="post-message-mobile">
|
||||
<span style={{cursor: 'pointer'}} key={`mob-ql-${index}`} className="quotelink-mobile"
|
||||
ref={el => {
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user