Closed KenPrz closed 1 year ago
Explicitly set the type attribute of the eye icon button to "button"
to prevent its default behavior of triggering form submission.
<button type="button" class="absolute right-3 top-1/2 transform -translate-y-1/2 cursor-pointer" id="passwordToggle">
<x-fas-eye class="w-5 h-5 text-gray-500" id="showPasswordIcon" />
<x-far-eye class="w-5 h-5 text-gray-500" id="hidePasswordIcon" style="display: none;" />
</button>
fixed
Issue Description
When clicking the eye icon button to toggle password visibility in the login form, the form is being submitted unexpectedly. This appears to be caused by the default behavior of the button element within the form, which triggers form submission.
Steps to Reproduce:
Expected Behavior
Clicking the eye icon button should toggle the password visibility without triggering form submission.
Actual Behavior
Clicking the eye icon button triggers the form submission.