From 835e9176c06d421ddacc7bb350deff230387e881 Mon Sep 17 00:00:00 2001 From: fallenbagel <98979876+fallenbagel@users.noreply.github.com> Date: Mon, 2 Mar 2026 16:33:11 +0500 Subject: [PATCH] fix(email): preserve newlines in PGP key textarea fields (#2617) --- .../Common/SensitiveInput/index.tsx | 19 +++++++++++++------ .../Notifications/NotificationsEmail.tsx | 2 +- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/components/Common/SensitiveInput/index.tsx b/src/components/Common/SensitiveInput/index.tsx index 9b19e4d0..65f48d80 100644 --- a/src/components/Common/SensitiveInput/index.tsx +++ b/src/components/Common/SensitiveInput/index.tsx @@ -20,7 +20,7 @@ const SensitiveInput = ({ as = 'input', ...props }: SensitiveInputProps) => { ? props : { ...props, - as: props.type === 'textarea' && !isHidden ? 'textarea' : undefined, + as: props.type === 'textarea' ? 'textarea' : undefined, }; return ( <> @@ -32,11 +32,18 @@ const SensitiveInput = ({ as = 'input', ...props }: SensitiveInputProps) => { {...componentProps} className={`rounded-l-only ${componentProps.className ?? ''}`} type={ - isHidden - ? 'password' - : props.type !== 'password' - ? (props.type ?? 'text') - : 'text' + props.type === 'textarea' + ? undefined + : isHidden + ? 'password' + : props.type !== 'password' + ? (props.type ?? 'text') + : 'text' + } + style={ + props.type === 'textarea' && isHidden + ? { WebkitTextSecurity: 'disc', ...props.style } + : props.style } />