fix(client): チャートのツールチップが画面に残ることがあるのを修正

Fix #9290
This commit is contained in:
syuilo 2022-12-28 13:15:31 +09:00
parent 55f923c674
commit f6b1f91cfa
2 changed files with 6 additions and 1 deletions

View File

@ -64,6 +64,7 @@ You should also include the user name that made the change.
- Client: use proxied image for instance icon @syuilo
- Client: Webhookの編集画面で、内容を保存することができない問題を修正 @m-hayabusa
- Client: update emoji picker immediately on all input @saschanaz
- Client: チャートのツールチップが画面に残ることがあるのを修正 @syuilo
## 12.119.1 (2022/12/03)
### Bugfixes

View File

@ -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;