-
{}} className="quote-link"
- onClick={(event) => handleQuoteClick(reply, null, event)}
- onMouseOver={() => handleQuoteHover(reply, null, (cid) => setOutOfViewCid(cid))}
- onMouseLeave={() => {
- removeHighlight();
- setOutOfViewCid(null);
+
{
+ threadBacklinkRefs.current[reply.cid] = el;
}}>
- c/{reply.shortCid}
-
+ {}}
+ className="quote-link"
+ onClick={(event) => handleQuoteClick(reply, null, event)}
+ onMouseOver={(event) => {
+ event.stopPropagation();
+ handleQuoteHover(reply, null, () => {
+ setOutOfViewCid(reply.cid);
+ const rect = threadBacklinkRefs.current[reply.cid].getBoundingClientRect();
+ setOutOfViewPosition({
+ top: rect.top + window.scrollY - rect.height / 2,
+ left: rect.left + rect.width + 5,
+ });
+ });
+ }}
+ onMouseLeave={() => {
+ removeHighlight();
+ setOutOfViewCid(null);
+ }}>
+ c/{reply.shortCid}
+
))
}
@@ -1098,7 +1122,6 @@ const Board = () => {
title="Post menu"
ref={el => {
replyMenuRefs.current[reply.cid] = el;
- postMenuRef.current = el;
}}
className='post-menu-button'
rotated={openMenuCid === reply.cid}
@@ -1189,16 +1212,29 @@ const Board = () => {
, document.body
)}
-