Design comparison
SolutionDesign
Solution retrospective
couldn't fix the bug when I enter email and password, the background color of the input change and I don't know why is that
Community feedback
- @MelvinAguilarPosted 11 months ago
Hello there ๐. Good job on completing the challenge !
-
The issue isn't that you're changing the color of the input; the problem is that you're clearing it every time you validate it. The first line of code in the
redPlaceholder()
function that is responsible for clearing the email and password should be commented out or removed to resolve the issue.function redPlaceholder() { /* inputs[i].value = ""; REMOVE THIS LINE */ inputs[i].classList.add('red'); inputBox[i].style.fontStyle = "italic"; }
I hope you find it useful! ๐
Happy coding!
Marked as helpful2 -
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord