From 2b9277a6a64cc871e91b5b0f8989f4dab74d4e51 Mon Sep 17 00:00:00 2001 From: Riccardo Balbo Date: Tue, 5 Nov 2024 17:29:20 +0100 Subject: [PATCH] do not override passed style --- components/form.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/components/form.js b/components/form.js index 7f11e19d7..aa77c5131 100644 --- a/components/form.js +++ b/components/form.js @@ -1188,12 +1188,17 @@ export function PasswordInput ({ newPass, qr, copy, readOnly, append, value, ... ) }, [showPass, copy, field?.value, qr, readOnly, append]) + if (props.as === 'textarea') { + if (!showPass) { + if (!props.style) props.style = {} + props.style.WebkitTextSecurity = 'disc' + } else { + if (props.style?.WebkitTextSecurity) delete props.style.WebkitTextSecurity + } + } return (