When using the standard password field in a Blazor Hybrid web app, there is a problem with the eye icon which is used to toggle password visibility. It is functional up until the point that the user clicks off the password field. From then on the eye icon will never reappear - and therefore the user can never toggle the visibility of their password - until the user fully deletes all characters and retypes a single character. This effectively resets the password field's logic and the field operates as expected once again.
This issue is reproduced every time in the Blazor Hybrid Windows Machine hot reload preview accessed in Visual Studio 2022 Community.
As it will be confusing to some users who momentarily clicked off before resuming typing their password, is there a way to fix this behaviour?
Code:
<div class="form-group">
<label for="pwd">Password:</label>
<input type="password" class="form-control" id="pwd" @bind="Password" @onkeypress="HandleKeyPress"/>
</div>