diff options
| author | かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com> | 2025-09-07 09:32:32 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-07 09:32:32 +0900 |
| commit | 430310f306d6a5c64e7c958bec0f6496fdc0416a (patch) | |
| tree | 153918a483376768990237c835a06fbd4b76d07a /packages/frontend/src/components/global | |
| parent | chore(frontend): add force cloud backup button for debugging (diff) | |
| download | misskey-430310f306d6a5c64e7c958bec0f6496fdc0416a.tar.gz misskey-430310f306d6a5c64e7c958bec0f6496fdc0416a.tar.bz2 misskey-430310f306d6a5c64e7c958bec0f6496fdc0416a.zip | |
fix(frontend): ctrlキーを押しながらリンクをクリックしても新しいタブで開かない問題を修正 (#16453)
* fix(frontend): ctrlキーを押しながらクリックしても新しいタブで開かない問題を修正
* Update Changelog
* fix: 制御キーの場合を個別ハンドリングするのではなくブラウザ既定の挙動に任せるように
* fix
Diffstat (limited to 'packages/frontend/src/components/global')
| -rw-r--r-- | packages/frontend/src/components/global/MkA.vue | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/packages/frontend/src/components/global/MkA.vue b/packages/frontend/src/components/global/MkA.vue index ae1b4549ec..99693a4c00 100644 --- a/packages/frontend/src/components/global/MkA.vue +++ b/packages/frontend/src/components/global/MkA.vue @@ -4,7 +4,7 @@ SPDX-License-Identifier: AGPL-3.0-only --> <template> -<a ref="el" :href="to" :class="active ? activeClass : null" @click.prevent="nav" @contextmenu.prevent.stop="onContextmenu"> +<a ref="el" :href="to" :class="active ? activeClass : null" @click="nav" @contextmenu.prevent.stop="onContextmenu"> <slot></slot> </a> </template> @@ -86,6 +86,11 @@ function openWindow() { } function nav(ev: MouseEvent) { + // 制御キーとの組み合わせは無視(shiftを除く) + if (ev.metaKey || ev.altKey || ev.ctrlKey) return; + + ev.preventDefault(); + if (behavior === 'browser') { window.location.href = props.to; return; |