Fix context menu display on Chrome

This commit is contained in:
celestora 2023-01-28 22:16:26 +02:00
parent 44796d4ee8
commit b8a45713da
2 changed files with 10 additions and 8 deletions

View file

@ -169,14 +169,16 @@ time.bsdn_timeFull {
padding: 6px;
border: 1px solid #908f90;
width: 232px;
height: 191px;
height: 169px;
font-size: 15px;
box-sizing: border-box;
}
.bsdn_contextMenuElement {
display: block;
color: #666294;
cursor: pointer;
padding: 3px 0px 3px 20px;
padding: 3px 0 3px 20px;
}
.bsdn_contextMenu hr {

View file

@ -151,15 +151,15 @@ function _bsdnEventListenerFactory(el, v) {
let h = rect.height, w = rect.width;
let x = e.pageX - rect.x, y = e.pageY - rect.y;
if(h - y < 191)
y -= 191;
if(h - y < 169)
y -= 169;
if(w - x < 246)
x -= 246;
if(w - x < 238)
x -= 238;
let menu = el.querySelector(".bsdn_contextMenu");
menu.style.top = y;
menu.style.left = x;
menu.style.top = y + "px";
menu.style.left = x + "px";
menu.style.display = "unset";
}
]