diff options
| author | かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com> | 2024-04-01 20:44:24 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-01 20:44:24 +0900 |
| commit | b4b47d85cf50486980cc3fa3575cf48c7fb0a2e7 (patch) | |
| tree | 7dcebec4c043c22c37c36c048304aeaa1b59ec5d /packages/frontend/src/components/MkContextMenu.vue | |
| parent | fix(frontend): ページデザインの修正 (#13642) (diff) | |
| download | sharkey-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.vue | 8 |
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) { |