Send wxEVT_WEBVIEW_NAVIGATED after updating history

This commit is contained in:
Tobias Taschner
2020-01-16 19:54:24 +01:00
parent 1a72654d69
commit 20c155e67f

View File

@@ -218,8 +218,6 @@ HRESULT wxWebViewEdgeImpl::OnNavigationCompleted(IWebView2WebView* WXUNUSED(send
}
else
{
wxWebViewEvent evt(wxEVT_WEBVIEW_NAVIGATED, m_ctrl->GetId(), uri, wxString());
m_ctrl->HandleWindowEvent(evt);
if (m_historyEnabled && !m_historyLoadingFromList &&
(uri == m_ctrl->GetCurrentURL()) ||
(m_ctrl->GetCurrentURL().substr(0, 4) == "file" &&
@@ -238,6 +236,8 @@ HRESULT wxWebViewEdgeImpl::OnNavigationCompleted(IWebView2WebView* WXUNUSED(send
}
//Reset as we are done now
m_historyLoadingFromList = false;
wxWebViewEvent evt(wxEVT_WEBVIEW_NAVIGATED, m_ctrl->GetId(), uri, wxString());
m_ctrl->HandleWindowEvent(evt);
}
return S_OK;
}