mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
implement PostOnHover component
This commit is contained in:
@@ -23,7 +23,6 @@ function handleQuoteHover(reply, parentCid, onElementOutOfView) {
|
||||
};
|
||||
|
||||
if (isInViewport(targetElement)) {
|
||||
onElementOutOfView(cid);
|
||||
const highlightedElements = document.querySelectorAll('.highlighted');
|
||||
|
||||
highlightedElements.forEach(el => {
|
||||
@@ -33,9 +32,11 @@ function handleQuoteHover(reply, parentCid, onElementOutOfView) {
|
||||
if (!targetElement.classList.contains('op-mobile') && !targetElement.classList.contains('op-desktop')) {
|
||||
targetElement.classList.add('highlighted');
|
||||
}
|
||||
} else {
|
||||
onElementOutOfView();
|
||||
}
|
||||
} else {
|
||||
return;
|
||||
onElementOutOfView();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user