From 6df65d4bdd5efa5a99f08f917d3e6535b740372c Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Mon, 9 Dec 2024 17:39:04 +0900 Subject: [PATCH] =?UTF-8?q?fix(frontend):=20=E3=83=87=E3=83=83=E3=82=AD?= =?UTF-8?q?=E3=81=A7=E3=83=80=E3=83=96=E3=83=AB=E3=82=AF=E3=83=AA=E3=83=83?= =?UTF-8?q?=E3=82=AF=E3=81=99=E3=82=8B=E3=81=A8=E3=82=A6=E3=82=A3=E3=83=B3?= =?UTF-8?q?=E3=83=89=E3=82=A6=E3=81=8C2=E6=9E=9A=E9=96=8B=E3=81=8F?= =?UTF-8?q?=E5=95=8F=E9=A1=8C=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/frontend/src/ui/deck.vue | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/frontend/src/ui/deck.vue b/packages/frontend/src/ui/deck.vue index a1a76a7e7d..756164d57c 100644 --- a/packages/frontend/src/ui/deck.vue +++ b/packages/frontend/src/ui/deck.vue @@ -135,11 +135,19 @@ const columnComponents = { roleTimeline: XRoleTimelineColumn, }; +// ダブルクリック時には2回クリックされた扱いになるので、2回目抑止するためのタイマー +// これによりウィンドウが2枚開かれることを防ぐ +let routerNavTimer: number | null = null; + mainRouter.navHook = (path, flag): boolean => { if (flag === 'forcePage') return false; + if (routerNavTimer != null) return true; const noMainColumn = !deckStore.state.columns.some(x => x.type === 'main'); if (deckStore.state.navWindow || noMainColumn) { os.pageWindow(path); + routerNavTimer = setTimeout(() => { + routerNavTimer = null; + }, 500); return true; } return false;