From be5ff96e4d02022492e0700459a70c4a1dad1043 Mon Sep 17 00:00:00 2001 From: Linus Rath <139418639+rathlinus@users.noreply.github.com> Date: Sun, 17 May 2026 23:45:57 +0200 Subject: [PATCH] fix: toggle recipient popover when clicking name again --- components/email/recipient-popover.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/components/email/recipient-popover.tsx b/components/email/recipient-popover.tsx index ab66ea67..007e8b12 100644 --- a/components/email/recipient-popover.tsx +++ b/components/email/recipient-popover.tsx @@ -39,7 +39,11 @@ export function RecipientPopover({ name, email, displayLabel, onViewContact, cla const phones = contact?.phones ? Object.values(contact.phones) : []; const orgs = contact?.organizations ? Object.values(contact.organizations) : []; - const handleOpen = () => { + const handleToggle = () => { + if (isOpen) { + handleClose(); + return; + } if (!triggerRef.current) return; const rect = triggerRef.current.getBoundingClientRect(); const popoverWidth = 300; @@ -125,7 +129,7 @@ export function RecipientPopover({ name, email, displayLabel, onViewContact, cla <>