diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2021-12-23 17:05:26 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2021-12-23 17:05:26 +0900 |
| commit | 3a990dce7520eb1e4fabb2dbdf0860f2c60432e4 (patch) | |
| tree | 5a84dd1f42dc985f56b3223dafb8c55807e8ff44 /packages/client/src/scripts | |
| parent | enhance(client): tweak channel pages (diff) | |
| download | sharkey-3a990dce7520eb1e4fabb2dbdf0860f2c60432e4.tar.gz sharkey-3a990dce7520eb1e4fabb2dbdf0860f2c60432e4.tar.bz2 sharkey-3a990dce7520eb1e4fabb2dbdf0860f2c60432e4.zip | |
refactor(client): refactor
Diffstat (limited to 'packages/client/src/scripts')
| -rw-r--r-- | packages/client/src/scripts/use-tooltip.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/packages/client/src/scripts/use-tooltip.ts b/packages/client/src/scripts/use-tooltip.ts index 0df4baca7b..d0c6756eb1 100644 --- a/packages/client/src/scripts/use-tooltip.ts +++ b/packages/client/src/scripts/use-tooltip.ts @@ -18,6 +18,9 @@ export function useTooltip( const open = () => { close(); if (!isHovering) return; + if (elRef.value == null) return; + const el = elRef.value instanceof Element ? elRef.value : elRef.value.$el; + if (!document.body.contains(el)) return; // openしようとしたときに既に元要素がDOMから消えている場合があるため const showing = ref(true); onShow(showing); |