refactor(frontend): use scrollX or scrollY (#13645)

This commit is contained in:
かっこかり
2024-04-01 20:44:24 +09:00
committed by GitHub
parent 61978cb4ca
commit b4b47d85cf
6 changed files with 42 additions and 42 deletions

View File

@@ -106,8 +106,8 @@ onMounted(() => {
}
const rect = props.source.getBoundingClientRect();
const x = ((rect.left + (props.source.offsetWidth / 2)) - (300 / 2)) + window.pageXOffset;
const y = rect.top + props.source.offsetHeight + window.pageYOffset;
const x = ((rect.left + (props.source.offsetWidth / 2)) - (300 / 2)) + window.scrollX;
const y = rect.top + props.source.offsetHeight + window.scrollY;
top.value = y;
left.value = x;