fix: Replace tag removal icon with a button for better accessibility and event handling

This commit is contained in:
web@ppanel 2025-12-29 06:18:56 +00:00
parent 4d15b2b6fc
commit 3751f64f73

View File

@ -128,13 +128,18 @@ export function TagInput({
variant="outline" variant="outline"
> >
{tag} {tag}
<X <button
className="size-4 cursor-pointer rounded-sm hover:text-destructive" className="ml-1 inline-flex items-center justify-center"
onClick={(e) => { onClick={(e) => {
e.preventDefault();
e.stopPropagation(); e.stopPropagation();
handleRemoveTag(index); handleRemoveTag(index);
}} }}
/> onMouseDown={(e) => e.preventDefault()}
type="button"
>
<X className="size-4 cursor-pointer rounded-sm hover:text-destructive" />
</button>
</Badge> </Badge>
))} ))}
<div className="flex min-w-0 flex-1 items-center gap-2"> <div className="flex min-w-0 flex-1 items-center gap-2">