From 4cfb011dfc880f7205ae43a60e88cf3e667d03ca Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Thu, 21 Mar 2024 13:16:55 -0300 Subject: [PATCH] Fix handling of password input when copied from another input --- src/frontend/src/components/inputComponent/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontend/src/components/inputComponent/index.tsx b/src/frontend/src/components/inputComponent/index.tsx index 08de2ea08..9fc02117a 100644 --- a/src/frontend/src/components/inputComponent/index.tsx +++ b/src/frontend/src/components/inputComponent/index.tsx @@ -90,7 +90,7 @@ export default function InputComponent({ // if the user copies a password from another input // it might come as ••••••••••• it causes errors // in ascii encoding, so we need to handle it - if (password) { + if (password && e.target.value.length > 0) { // check if all chars are • if (e.target.value.split("").every((char) => char === "•")) { setErrorData({