Hi,
I have the latest version 18.3.0.41 from today.
I used SFTextbox as Input type with Autocomplete = Off in some pages and it works as expected. EDIT: If I login with the username, the SFTextbox already autocomplete the text with the username in all the pages I use this textbox
I also used SFTextbox as Password type with Autocomplete = Off inside a modal dialog in 3 SFTextbox to change the user password.
The problem is that, when opening this dialog, the first SFTextbox is automatically autocompleted with the password previously used to login.
This is a part of the code of this dialog:
<SfDialog @bind-Visible="@IsVisible" Header="@Header" AllowDragging="true" CloseOnEscape="false" ShowCloseIcon="true" IsModal="true" Width="400" Height="475">
<DialogTemplates>
<Content>
<div class="d-flex flex-column flex-lg-row flex-column-fluid ">
<div class="flex-row-fluid d-flex flex-column justify-content-center position-relative overflow-hidden p-7 mx-auto">
<div class="d-flex flex-column-fluid flex-center">
<div class="d-flex align-items-start flex-wrap flex-column mr-2 mb-2">
<span class="font-weight-bold mb-2 mr-5 mt-3 text-dark">@LanguageManager.Users_OldPassword</span>
<SfTextBox Value="@(OldPassword)" Placeholder="@LanguageManager.Users_OldPassword" Width="250px" Input="OnInputOldPassword" Type="InputType.Password" Autocomplete="AutoComplete.Off" />
<span class="font-weight-bold mb-2 mr-5 mt-3 text-dark">@LanguageManager.Users_ConfirmOldPassword</span>
<SfTextBox Value="@(ConfirmOldPassword)" Placeholder="@LanguageManager.Users_ConfirmOldPassword" Width="250px" CssClass="@CssClass" Input="OnInputConfirmOldPassword" Type="InputType.Password" Autocomplete="AutoComplete.Off" />
@if (!String.IsNullOrEmpty(CssClass))
{
if (CssClass.Equals("e-error"))
{
<span class="mr-5 mt-2" style="color:red;font-size: 0.75rem;">@LanguageManager.Users_PasswordDidntMatch</span>
}
}
<span class="font-weight-bold mb-2 mr-5 mt-3 text-dark">@LanguageManager.Users_NewPassword</span>
<SfTextBox Value="@(NewPassword)" Placeholder="@LanguageManager.Users_NewPassword" Width="250px" Input="OnInputNewPassword" Type="InputType.Password" Autocomplete="AutoComplete.Off" />
</div>
</div>
</div>
</div>
</Content>
<FooterTemplate>
<SfButton Content="@LanguageManager.Buttons_Cancel" CssClass="contextMenuButton closeContextButton" OnClick="@CloseDialog" />
<SfProgressButton Content="@LanguageManager.Buttons_Save" CssClass="contextMenuButton saveContextButton" IconCss="contextmenu-icons Save" IconPosition="IconPosition.Left" @ref="SaveButton" Disabled="@(!_CanSave)" Duration="50000">
<ProgressButtonSpinSettings Width="18" Position="SpinPosition.Right"></ProgressButtonSpinSettings>
<ProgressButtonEvents OnBegin="OnBeginSave"></ProgressButtonEvents>
</SfProgressButton>
</FooterTemplate>
</DialogTemplates>
</SfDialog>
@code {
#region Variables
[Parameter]
public string Header { get; set; } = "";
private string OldPassword { get; set; } = "";
private string ConfirmOldPassword { get; set; } = "";
private string NewPassword { get; set; } = "";
private bool IsVisible { get; set; } = false;
private bool _CanSave = false;
private bool _SaveRequested = false;
private string CssClass;
private SfProgressButton SaveButton;
#endregion
protected override async Task OnInitializedAsync()
{
_SaveRequested = false;
OldPassword = "";
ConfirmOldPassword = "";
NewPassword = "";
}
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender)
{
_SaveRequested = false;
OldPassword = "";
ConfirmOldPassword = "";
NewPassword = "";
}
}
....
more insignifigant code to this behaviour
....
Do you have any idea why it happens?
Thank you in advance.
Best regards
|
<SfDialog @ref="DialogObj" @bind-Visible="@IsVisible" Header="@Header" AllowDragging="true" CloseOnEscape="false" ShowCloseIcon="true" IsModal="true" Width="400" Height="475">
<DialogTemplates>
<Header> <div style="text-align: center;">Create Password</div> </Header>
<Content>
<SfTextBox Value="@(OldPassword)" Placeholder="OldPassword" Width="250px" Type="InputType.Password" Autocomplete="AutoComplete.Off" />
<br />
<SfTextBox Value="@(ConfirmOldPassword)" Placeholder="ConfirmOldPassword" Width="250px" Type="InputType.Password" Autocomplete="AutoComplete.Off"/>
<br />
<SfTextBox Value="@(NewPassword)" Placeholder="Users_NewPassword" Width="250px" Type="InputType.Password" Autocomplete="AutoComplete.Off"/>
<br />
</Content>
</DialogTemplates>
</SfDialog> |
|
|
Just ran into this issue, chrome does not understand autocomplete="off".
To workaround the issue you can set the following:
InputAttributes="new Dictionary<string, object>() { { "autocomplete", "new-password" } }"