summaryrefslogtreecommitdiff
path: root/packages/frontend/src/components/MkContextMenu.vue
diff options
context:
space:
mode:
authorかっこかり <67428053+kakkokari-gtyih@users.noreply.github.com>2024-04-01 20:44:24 +0900
committerGitHub <noreply@github.com>2024-04-01 20:44:24 +0900
commitb4b47d85cf50486980cc3fa3575cf48c7fb0a2e7 (patch)
tree7dcebec4c043c22c37c36c048304aeaa1b59ec5d /packages/frontend/src/components/MkContextMenu.vue
parentfix(frontend): ページデザインの修正 (#13642) (diff)
downloadsharkey-b4b47d85cf50486980cc3fa3575cf48c7fb0a2e7.tar.gz
sharkey-b4b47d85cf50486980cc3fa3575cf48c7fb0a2e7.tar.bz2
sharkey-b4b47d85cf50486980cc3fa3575cf48c7fb0a2e7.zip
refactor(frontend): use `scrollX` or `scrollY` (#13645)
Diffstat (limited to 'packages/frontend/src/components/MkContextMenu.vue')
-rw-r--r--packages/frontend/src/components/MkContextMenu.vue8
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/frontend/src/components/MkContextMenu.vue b/packages/frontend/src/components/MkContextMenu.vue
index 5ca3c77fb2..a807742bb9 100644
--- a/packages/frontend/src/components/MkContextMenu.vue
+++ b/packages/frontend/src/components/MkContextMenu.vue
@@ -47,12 +47,12 @@ onMounted(() => {
const width = rootEl.value!.offsetWidth;
const height = rootEl.value!.offsetHeight;
- if (left + width - window.pageXOffset >= (window.innerWidth - SCROLLBAR_THICKNESS)) {
- left = (window.innerWidth - SCROLLBAR_THICKNESS) - width + window.pageXOffset;
+ if (left + width - window.scrollX >= (window.innerWidth - SCROLLBAR_THICKNESS)) {
+ left = (window.innerWidth - SCROLLBAR_THICKNESS) - width + window.scrollX;
}
- if (top + height - window.pageYOffset >= (window.innerHeight - SCROLLBAR_THICKNESS)) {
- top = (window.innerHeight - SCROLLBAR_THICKNESS) - height + window.pageYOffset;
+ if (top + height - window.scrollY >= (window.innerHeight - SCROLLBAR_THICKNESS)) {
+ top = (window.innerHeight - SCROLLBAR_THICKNESS) - height + window.scrollY;
}
if (top < 0) {