Skip to content

Commit 839d8eb

Browse files
committed
fix(chat): keep the remove badge reachable on coarse pointers
Gating the reveal on hover-hover alone would hide it from touch entirely, since that variant is fine-pointer only. Instead it is visible by default and only fine pointers get reveal-on-hover, so the badge never depends on an emulated hover.
1 parent 43c3996 commit 839d8eb

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/attached-files-list

apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/attached-files-list/attached-files-list.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,9 @@ const AttachedFileChip = React.memo(function AttachedFileChip({
115115
onRemoveFile(file.id)
116116
}}
117117
aria-label={`Remove ${file.name}`}
118-
className='absolute top-[2px] right-[2px] flex size-[16px] items-center justify-center rounded-full border border-[var(--border)] bg-[var(--surface-2)] text-[var(--text-body)] opacity-0 transition-opacity group-hover:opacity-100'
118+
/* Visible by default so a coarse pointer never has to discover it through an
119+
emulated hover; fine pointers get the reveal-on-hover treatment. */
120+
className='absolute top-[2px] right-[2px] flex size-[16px] items-center justify-center rounded-full border border-[var(--border)] bg-[var(--surface-2)] text-[var(--text-body)] transition-opacity hover-hover:opacity-0 hover-hover:group-hover:opacity-100'
119121
>
120122
<X className='size-[10px]' />
121123
</button>

0 commit comments

Comments
 (0)