1 | IWCGJQEdit1:= FindComponentByName(NewName) as TIWCGJQEdit; |
Are you saying there is no way to forbid Chrome Mobile to store user names and passwords for the edit controls on a form?
You can do this way in google chrome by going to setting/Password and Forms > Disable [Enable Autofill to fill out web forms in a single click.] and Disable [Offer to save passwords with Google Smart Lock for Passwords.]
autocomplete="new-password"
procedure TEmMobileClientCGLoginWebDialog.IWAppFormCreate(Sender: TObject);
procedure AddChromeAutoFillWorkaround(const Edits: array of TIWCGJQMEdit);
var
Edit: TIWCGJQMEdit;
procedure SetTemporaryReadOnly;
begin
Edit.JQMEditOptions.EditTypeOptions.ReadOnly := True;
Edit.JQMEditOptions.Events.OnFocus.Script :=
'function (event){' +
' if (this.hasAttribute(''readonly'')){' +
' this.removeAttribute(''readonly'');' +
' }' +
'}';
end;
begin
Logger.ReportDebugUI(SafeFormat('Browser %s detected, adding workaround with temporary readonly'
+ ' attribute for edits to avoid problems with autofill', [WebApplication.Browser.BrowserName]));
for Edit in Edits do
SetTemporaryReadOnly;
end;
begin
{more code here...}
inherited;
if WebApplication.Browser is TChrome then {TChromeMobile inherits from TChrome}
AddChromeAutoFillWorkaround([SubscriptionIDEdit, SubscriptionPasswordEdit, UserNameEdit,
UserPasswordEdit, PasscodeEdit]);
{more code here...}
end;