diff --git a/ui/desktop/src/components/Modal.tsx b/ui/desktop/src/components/Modal.tsx index 7ead76a1801e..5c73ce4204a0 100644 --- a/ui/desktop/src/components/Modal.tsx +++ b/ui/desktop/src/components/Modal.tsx @@ -28,7 +28,8 @@ export default function Modal({ if ( modalRef.current && !modalRef.current.contains(e.target as Node) && - !(e.target as HTMLElement).closest('.select__menu') + !(e.target as HTMLElement).closest('.select__menu') && + window.getSelection()?.toString().length === 0 // Ensure no text is selected ) { onClose(); }