Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Sharkey
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dima Krasner
Sharkey
Commits
e00fdc2d
Unverified
Commit
e00fdc2d
authored
1 year ago
by
YAVIIGI
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
fix(frontend): use-tooltip の呼び出し元の UI が無くなったら自動的に削除されるようにする (#11949)
* Update use-tooltip.ts * Update CHANGELOG.md
parent
68404346
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.md
+1
-0
1 addition, 0 deletions
CHANGELOG.md
packages/frontend/src/scripts/use-tooltip.ts
+14
-0
14 additions, 0 deletions
packages/frontend/src/scripts/use-tooltip.ts
with
15 additions
and
0 deletions
CHANGELOG.md
+
1
−
0
View file @
e00fdc2d
...
...
@@ -20,6 +20,7 @@
-
Enhance: AiScriptでホストのアドレスを参照する定数
`SERVER_URL`
を追加
-
Enhance: モデレーションログ機能の強化
-
Enhance: ローカリゼーションの更新
-
Fix: リアクションしたユーザ一覧のUIが稀に左上に残ってしまう不具合を修正
### Server
-
Fix: Redisに古いバージョンのキャッシュが残っている場合、キャッシュが消えるまでの間通知が届かなくなる問題を修正
...
...
This diff is collapsed.
Click to expand it.
packages/frontend/src/scripts/use-tooltip.ts
+
14
−
0
View file @
e00fdc2d
...
...
@@ -21,6 +21,8 @@ export function useTooltip(
let
changeShowingState
:
(()
=>
void
)
|
null
;
let
autoHidingTimer
;
const
open
=
()
=>
{
close
();
if
(
!
isHovering
)
return
;
...
...
@@ -33,6 +35,16 @@ export function useTooltip(
changeShowingState
=
()
=>
{
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
=
()
=>
{
...
...
@@ -53,6 +65,7 @@ export function useTooltip(
if
(
!
isHovering
)
return
;
isHovering
=
false
;
window
.
clearTimeout
(
timeoutId
);
window
.
clearInterval
(
autoHidingTimer
);
close
();
};
...
...
@@ -67,6 +80,7 @@ export function useTooltip(
if
(
!
isHovering
)
return
;
isHovering
=
false
;
window
.
clearTimeout
(
timeoutId
);
window
.
clearInterval
(
autoHidingTimer
);
close
();
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment