summaryrefslogtreecommitdiff
path: root/packages/frontend/src/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/frontend/src/scripts')
-rw-r--r--packages/frontend/src/scripts/use-chart-tooltip.ts6
1 files changed, 5 insertions, 1 deletions
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;