flutter-webview-windows icon indicating copy to clipboard operation
flutter-webview-windows copied to clipboard

Setting GeneralAutofillEnabled and PasswordAutosaveEnabled to true

Open Eerey opened this issue 2 years ago • 1 comments

Hi @jnschulze We want to use these functions: https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2settings4?view=webview2-1.0.1661.34#summary

function description
get_IsGeneralAutofillEnabled IsGeneralAutofillEnabled controls whether autofill for information like names, street and email addresses, phone numbers, and arbitrary input is enabled.
get_IsPasswordAutosaveEnabled IsPasswordAutosaveEnabled controls whether autosave for password information is enabled.
put_IsGeneralAutofillEnabled Set the IsGeneralAutofillEnabled property.
put_IsPasswordAutosaveEnabled Set the IsPasswordAutosaveEnabled property.

I tried doing that by doing that:

  wil::com_ptr<ICoreWebView2Settings> settings;
  if (SUCCEEDED(webview_->get_Settings(settings.put()))) {
    settings2_ = settings.try_query<ICoreWebView2Settings2>();

    settings->put_IsStatusBarEnabled(FALSE);
    settings->put_AreDefaultContextMenusEnabled(FALSE);
    settings4_ = settings.try_query<ICoreWebView2Settings4>();
    settings4_->put_IsPasswordAutosaveEnabled(TRUE);
    settings4_->put_IsGeneralAutofillEnabled(TRUE);
  }

However, the auto fill options are not shown. Only once the auto fill options were shown, but they were strangely offset like -500px (and on another screen).

What's going on here? What am I doing wrong?

Cheers

Eerey avatar Mar 22 '23 11:03 Eerey

Any updates on that @jnschulze ?

Eerey avatar Sep 16 '24 13:09 Eerey