Design comparison
Solution retrospective
Please let me know how I can improve my JS code in this project, many thanks!
Community feedback
- @arbaivPosted almost 3 years ago
Hi, thereπ. Amazing project, nice work with the JS.
Once you submit the form with the input fields empty, it shows an error as expected π Then when you enter text into the input field and focus out from it, the error message still shows. And it doesn't go away until you hit the submit button again. It's okay, not a big deal, but it's not good for the UX.
You can improve that by adding a blur event to the input element that will check: if the input value is available then remove the error message.
1@seilrevenPosted almost 3 years ago@arbaiv
Thank you so much for the suggestion! I just added some code and I think now it should behave according to what you said. This is my first time trying a blur event, so the code is probably not concise.
0
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