From 40f45b4183aca0de0f936066b34b13ab79ea4bbf Mon Sep 17 00:00:00 2001 From: rassilon Date: Fri, 20 Mar 2015 14:02:17 -0400 Subject: [PATCH 1/2] Don't change the .Address property when (among other things) you display DevTools. --- CefSharp.Core/Internals/ClientAdapter.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CefSharp.Core/Internals/ClientAdapter.cpp b/CefSharp.Core/Internals/ClientAdapter.cpp index 66fcb450a1..8a8e49474a 100644 --- a/CefSharp.Core/Internals/ClientAdapter.cpp +++ b/CefSharp.Core/Internals/ClientAdapter.cpp @@ -124,7 +124,11 @@ namespace CefSharp void ClientAdapter::OnAddressChange(CefRefPtr browser, CefRefPtr 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)); } From 460cca4e5c81b6bbf2f7d46bb044c2e232eef2ad Mon Sep 17 00:00:00 2001 From: rassilon Date: Sat, 21 Mar 2015 10:02:30 -0400 Subject: [PATCH 2/2] Use IsPopup instead. --- CefSharp.Core/Internals/ClientAdapter.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/CefSharp.Core/Internals/ClientAdapter.cpp b/CefSharp.Core/Internals/ClientAdapter.cpp index 8a8e49474a..b9c5d88c3f 100644 --- a/CefSharp.Core/Internals/ClientAdapter.cpp +++ b/CefSharp.Core/Internals/ClientAdapter.cpp @@ -124,11 +124,7 @@ namespace CefSharp void ClientAdapter::OnAddressChange(CefRefPtr browser, CefRefPtr frame, const CefString& address) { - // 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) + if (!browser->IsPopup()) { _browserControl->SetAddress(StringUtils::ToClr(address)); }