Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save / Update Password prompts do not work #32

Open
zattu1 opened this issue Aug 4, 2021 · 0 comments
Open

Save / Update Password prompts do not work #32

zattu1 opened this issue Aug 4, 2021 · 0 comments

Comments

@zattu1
Copy link

zattu1 commented Aug 4, 2021

I want to use Save / Update Password prompts, but it doesn't take effect even if I put the following process.
Is there anything else I need to do?

HRESULT BrowserWindow::CreateBrowserControlsWebView()
{
    return m_uiEnv->CreateCoreWebView2Controller(m_hWnd, Callback<ICoreWebView2CreateCoreWebView2ControllerCompletedHandler>(
        [this](HRESULT result, ICoreWebView2Controller* host) -> HRESULT
    {
        if (!SUCCEEDED(result))
        {
            OutputDebugString(L"Controls WebView creation failed\n");
            return result;
        }
        // WebView created
        m_controlsController = host;
        CheckFailure(m_controlsController->get_CoreWebView2(&m_controlsWebView), L"");

        wil::com_ptr<ICoreWebView2Settings> settings;
        RETURN_IF_FAILED(m_controlsWebView->get_Settings(&settings));
        RETURN_IF_FAILED(settings->put_AreDevToolsEnabled(FALSE));

        wil::com_ptr<ICoreWebView2Settings4> settings4;
        RETURN_IF_FAILED(m_controlsWebView->get_Settings(&settings));
        settings4 = settings.try_query<ICoreWebView2Settings4>();
        settings4->put_IsPasswordAutosaveEnabled(TRUE);

       ....
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant