diff --git a/php/public/forms.js b/php/public/forms.js index 940e4ee3..52c72b92 100644 --- a/php/public/forms.js +++ b/php/public/forms.js @@ -41,7 +41,7 @@ function showPassword(id) { let passwordField = document.getElementById(id); - if (passwordField.value !== "" && passwordField.type !== "text") { + if (passwordField.type === "password" && passwordField.value !== "") { passwordField.type = "text"; } else if (passwordField.value === "" && passwordField.type !== "password") { passwordField.type = "password";