Open dotnetshadow opened 2 years ago
I managed to get a workaround, it's not elegant but works for now
Added @ref="submitButton"
to the sign in button
<MudButton @ref="submitButton" ButtonType="ButtonType.Submit" Variant="Variant.Filled" Disabled="@(!Validated)" Color="Color.Primary" Size="Size.Large" Style="width: 100%;">@_localizer["Sign In"]</MudButton>
Added OnKeyPress="KeyHandler"
to the textfield
<MudTextField Label="@_localizer["Password"]" Variant="Variant.Outlined"
@bind-Value="_tokenModel.Password" For="@(() => _tokenModel.Password)"
OnKeyPress="KeyHandler" ... />
The handler forces the submitbutton to have focus
private void KeyHandler(KeyboardEventArgs args)
{
if (args.Key == "Enter")
{
submitButton.FocusAsync();
}
}
Describe the bug When you login but press enter on the password field, it logs you in but the avatar and name is blank.
To Reproduce Steps to reproduce the behavior:
Expected behavior The avatar, name and email should be showing on the left hand panel and on the top right corner If I press the submit button then everything works correctly
Screenshots![image](https://user-images.githubusercontent.com/296247/139200464-6e2463e6-eb4c-4e26-94b9-3df727c959d1.png)
Desktop (please complete the following information): Windows 10, chrome, firefox all browsers