Skip to content

Commit 0cf01e7

Browse files
huoxin233claude
andcommitted
fix(admin): blur visibility toggle after click to dismiss tooltip
After toggling announcement visibility, the button retains browser focus, which keeps the tooltip visible even after the cursor moves away. Call blur() to release focus and allow the tooltip to dismiss naturally on mouse-out. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ec9a957 commit 0cf01e7

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

framework/core/js/src/admin/components/AnnouncementWidget.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,14 @@ export default class AnnouncementsWidget extends DashboardWidget {
8484
</Tooltip>
8585
)}
8686
<Tooltip text={app.translator.trans(this.hidden ? 'core.admin.announcements.show' : 'core.admin.announcements.hide')}>
87-
<Button className="Button Button--icon" icon={this.hidden ? 'fas fa-eye' : 'fas fa-eye-slash'} onclick={() => this.toggleHidden()} />
87+
<Button
88+
className="Button Button--icon"
89+
icon={this.hidden ? 'fas fa-eye' : 'fas fa-eye-slash'}
90+
onclick={(e: any) => {
91+
this.toggleHidden();
92+
e.currentTarget.blur();
93+
}}
94+
/>
8895
</Tooltip>
8996
</div>
9097
</div>

0 commit comments

Comments
 (0)