Skip to content

Commit 980b9fe

Browse files
committed
WinForms - Temp workaround for a bug where the address passed into the constructor isn't always loading
1 parent a86e8a5 commit 980b9fe

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

CefSharp.WinForms/ChromiumWebBrowser.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,8 @@ private void CreateBrowser()
612612
{
613613
if(IsBrowserInitialized == false || browser == null)
614614
{
615-
managedCefBrowserAdapter.CreateBrowser(BrowserSettings, (RequestContext)RequestContext, Handle, Address);
615+
//TODO: Revert temp workaround for default url not loading
616+
managedCefBrowserAdapter.CreateBrowser(BrowserSettings, (RequestContext)RequestContext, Handle, null);
616617
}
617618
else
618619
{
@@ -632,6 +633,12 @@ void IWebBrowserInternal.OnAfterBrowserCreated(IBrowser browser)
632633
this.browser = browser;
633634
IsBrowserInitialized = true;
634635

636+
//TODO: Revert temp workaround for default url not loading
637+
if(!string.IsNullOrEmpty(Address))
638+
{
639+
browser.MainFrame.LoadUrl(Address);
640+
}
641+
635642
// By the time this callback gets called, this control
636643
// is most likely hooked into a browser Form of some sort.
637644
// (Which is what ParentFormMessageInterceptor relies on.)

0 commit comments

Comments
 (0)