fix styling and positioning of post menu

This commit is contained in:
Tom
2023-05-25 13:27:09 +02:00
parent e392a1e584
commit 52b7243035
3 changed files with 29 additions and 43 deletions
+2 -2
View File
@@ -796,7 +796,7 @@ const Thread = () => {
onClick={() => {
const rect = threadMenuRefs.current[comment.cid].getBoundingClientRect();
const menu = document.querySelector(`.post-menu-thread-${comment.cid}`);
menu.style.top = `calc(${rect.top}px + 17px)`;
menu.style.top = `calc(${rect.top + window.scrollY}px + 17px)`;
menu.style.left = `${rect.left}px`;
setRotatedStates(prevState => ({
@@ -968,7 +968,7 @@ const Thread = () => {
onClick={() => {
const rect = replyMenuRefs.current[reply.cid].getBoundingClientRect();
const menu = document.querySelector(`.post-menu-reply-${reply.cid}`);
menu.style.top = `calc(${rect.top}px + 17px)`;
menu.style.top = `calc(${rect.top + window.scrollY}px + 17px)`;
menu.style.left = `${rect.left}px`;
setRotatedStates(prevState => ({