From f6b1f91cfa1aafd40dd05d9803d6118141ec2d6e Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 28 Dec 2022 13:15:31 +0900 Subject: fix(client): チャートのツールチップが画面に残ることがあるのを修正 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix #9290 --- packages/frontend/src/scripts/use-chart-tooltip.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'packages/frontend/src/scripts') diff --git a/packages/frontend/src/scripts/use-chart-tooltip.ts b/packages/frontend/src/scripts/use-chart-tooltip.ts index 881e5e9ad5..6f40fd4a30 100644 --- a/packages/frontend/src/scripts/use-chart-tooltip.ts +++ b/packages/frontend/src/scripts/use-chart-tooltip.ts @@ -1,4 +1,4 @@ -import { onUnmounted, ref } from 'vue'; +import { onUnmounted, onDeactivated, ref } from 'vue'; import * as os from '@/os'; import MkChartTooltip from '@/components/MkChartTooltip.vue'; @@ -24,6 +24,10 @@ export function useChartTooltip(opts: { position: 'top' | 'middle' } = { positio if (disposeTooltipComponent) disposeTooltipComponent(); }); + onDeactivated(() => { + tooltipShowing.value = false; + }); + function handler(context) { if (context.tooltip.opacity === 0) { tooltipShowing.value = false; -- cgit v1.2.3-freya