cefsharp / CefSharp

.NET (WPF and Windows Forms) bindings for the Chromium Embedded Framework
http://cefsharp.github.io/
Other
9.89k stars 2.92k forks source link

Freezing when showing new form #1846

Closed plhearn closed 8 years ago

plhearn commented 8 years ago

Have the same form thats using the browser control try to open another form.

When using the visual studio IE browser control the form displays normally:

http://i.imgur.com/R4YW2kt.png

But when using the cefsharp browser control the form freezes when displayed:

http://i.imgur.com/N0MjDmc.png

When the user goes to a certain website it opens a popup window. This window calls a javascript window.extern call back to the form which opens a new form. This is working with the default web browser object but the new form freezes for some reason with cefsharp. I've gone through the FAQ and troubleshooting guide but haven't been able to fix it. The code I'm using for cefsharp is almost identical to that in the quick start guide. The only extra thing I'm doing is calling "chromeBrowser.RegisterJsObject("external", this);" to register the form methods.

amaitland commented 8 years ago

Please only open an issue if you have a BUG to report, if you simply have a question or require some assistance keep reading for info. If you do have a BUG to report, please use the Bug Report template below.

Please take the time to read the issue template, if you have a question, ask it on Gitter, post on StackOverflow or use http://magpcss.org/ceforum/ (for questions specific to CEF).

https://github.com/cefsharp/CefSharp/blob/master/ISSUE_TEMPLATE.md

amaitland commented 8 years ago

Avoid passing this in when you register an object, use a different method. Make sure you open your form on the UI thread, not directly in a bound method. Your probably blocking the render process.