Don't change the .Address property when (among other things) you display DevTools.

This commit is contained in:
rassilon
2015-03-20 14:02:17 -04:00
parent 0572ef6a25
commit 40f45b4183
+5 -1
View File
@@ -124,7 +124,11 @@ namespace CefSharp
void ClientAdapter::OnAddressChange(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, const CefString& address)
{
if (frame->IsMain())
// If it's our toplevel browser frame then change the browser control's
// address property.
if (browser->GetIdentifier() == _cefBrowser->GetIdentifier()
&& frame->IsMain()
&& frame->GetParent() == nullptr)
{
_browserControl->SetAddress(StringUtils::ToClr(address));
}