A full-featured CRM built with React, shadcn/ui, and Supabase.
stop click propagation on note attachments
Jean-Baptiste Kaiser82f1d30049eb
diff --git a/src/components/atomic-crm/notes/NoteAttachments.tsx b/src/components/atomic-crm/notes/NoteAttachments.tsxindex 914916ab..b931d666 100644--- a/src/components/atomic-crm/notes/NoteAttachments.tsx+++ b/src/components/atomic-crm/notes/NoteAttachments.tsx@@ -24,7 +24,10 @@ export const NoteAttachments = ({ note }: { note: ContactNote | DealNote }) => {src={attachment.src}alt={attachment.title}className="w-[200px] h-[100px] object-cover cursor-pointer object-left border border-border"- onClick={() => window.open(attachment.src, "_blank")}+ onClick={(e) => {+ e.stopPropagation();+ window.open(attachment.src, "_blank");+ }}/></div>))}@@ -39,6 +42,7 @@ export const NoteAttachments = ({ note }: { note: ContactNote | DealNote }) => {target="_blank"rel="noopener noreferrer"className="underline hover:no-underline"+ onClick={(e) => e.stopPropagation()}>{attachment.title}</a>