CodeBeamOrg / CodeBeam.MudBlazor.Extensions

Useful third party extension components for MudBlazor, from the contributors.
https://mudextensions.codebeam.org/
MIT License
367 stars 62 forks source link

MudPasswordField - Add ability to disable focus on adornment #268

Closed pmikstacki closed 10 months ago

pmikstacki commented 10 months ago

Hello, I've noticed that when MudPasswordField is used withing a Form, it acts like if it had two focusable elements (when I tab through I have to do it twice to skip to the next element. Here's the code that's causing this issue:

 <MudForm @ref="form" Validation="@(validator.ValidateValue)">
                        <MudGrid Spacing="2">
                            <MudItem lg="12" md="12" sm="12" xs="12">
                                <MudTextField T="string" Variant="Variant.Outlined" For="() => user.Login" @bind-Value="Login" Label="Login"/>
                            </MudItem>
                            <MudItem lg="12" md="12" sm="12" xs="12">
                                <MudPasswordField @bind-Value="user.OldPassword" For="() => user.OldPassword" Variant="Variant.Outlined" IconSize="Size.Small"/>
                            </MudItem>
                            <MudItem lg="12" md="12" sm="12" xs="12">
                                <MudPasswordField @bind-Value="user.NewPassword" For="() => user.NewPassword" Variant="Variant.Outlined" IconSize="Size.Small"/>
                            </MudItem>
                            <MudItem lg="12" md="12" sm="12" xs="12">
                                <MudPasswordField @bind-Value="user.NewPasswordRepeat" For="() => user.NewPasswordRepeat" Variant="Variant.Outlined" IconSize="Size.Small" />

                            </MudItem>
                        </MudGrid>
                </MudForm>
pmikstacki commented 10 months ago

OK, it seems that password box allows tab on the eye adornment. It would be nice to have a property allowing to disable focus on the eye adornment. I am changing the issue title.

mckaragoz commented 10 months ago

OK, it seems that password box allows tab on the eye adornment. It would be nice to have a property allowing to disable focus on the eye adornment. I am changing the issue title.

Yes, this is the exact issue. I will add AdornmentTabStop parameter to let user stop or not, and the default behavior will change that not to stop with next release.