Merge branch 'develop' into edited-note-history

This commit is contained in:
GrapeApple0 2023-10-03 17:44:36 +09:00 committed by GitHub
commit c5f0ce0d4e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 0 deletions

View file

@ -12,6 +12,11 @@
--> -->
## 2023.10.0
### Client
- Fix: リアクションしたユーザ一覧のUIが稀に左上に残ってしまう不具合を修正
## 2023.9.3 ## 2023.9.3
### General ### General
- Enhance: ノートの翻訳機能の利用可否をロールで設定可能に - Enhance: ノートの翻訳機能の利用可否をロールで設定可能に

View file

@ -21,6 +21,8 @@ export function useTooltip(
let changeShowingState: (() => void) | null; let changeShowingState: (() => void) | null;
let autoHidingTimer;
const open = () => { const open = () => {
close(); close();
if (!isHovering) return; if (!isHovering) return;
@ -33,6 +35,16 @@ export function useTooltip(
changeShowingState = () => { changeShowingState = () => {
showing.value = false; showing.value = false;
}; };
autoHidingTimer = window.setInterval(() => {
if (!document.body.contains(elRef.value)) {
if (!isHovering) return;
isHovering = false;
window.clearTimeout(timeoutId);
close();
window.clearInterval(autoHidingTimer);
}
}, 1000);
}; };
const close = () => { const close = () => {
@ -53,6 +65,7 @@ export function useTooltip(
if (!isHovering) return; if (!isHovering) return;
isHovering = false; isHovering = false;
window.clearTimeout(timeoutId); window.clearTimeout(timeoutId);
window.clearInterval(autoHidingTimer);
close(); close();
}; };
@ -67,6 +80,7 @@ export function useTooltip(
if (!isHovering) return; if (!isHovering) return;
isHovering = false; isHovering = false;
window.clearTimeout(timeoutId); window.clearTimeout(timeoutId);
window.clearInterval(autoHidingTimer);
close(); close();
}; };