This started happening with the latest version of EO.WebBrowser.
On LoadCompleted() event of a WebView we call EvalScript() to getElementByID and change the style.marginTop to 10px. When EvalScript is called the entire app freezes, and all of Windows become non-responsive, you can't click anything, not even the taskbar of Windows. Eventually it becomes unlocked on its own, or you right-click somewhere, or CTRL+ALT+DEL, and it all comes back. The EvalScript does execute. Oddly enough, it seems to only happen with marginTop, or marginBottom, or any margin is changed. Other style attributes work as they should, but I haven't tried them all.
To test, just drop a EO.WebControl onto a Windows Forms App, and do this:
Code: C#
public Form1()
{
InitializeComponent();
webControl1.WebView.Url = "https://google.com";
webControl1.WebView.LoadCompleted += new EO.WebBrowser.LoadCompletedEventHandler(WebView_LoadCompleted);
}
void WebView_LoadCompleted(object sender, EO.WebBrowser.LoadCompletedEventArgs e)
{
if (webControl1.WebView.CanEvalScript)
{
webControl1.WebView.EvalScript("document.getElementById('gsr').style.marginTop = '10px';");
}
}
The app and all Windows should lock up. At least on Windows 8 and 10.
If you change the EvalScript to this:
Code: C#
webControl1.WebView.EvalScript("document.getElementById('gsr').style.border = 'thick solid #000000';");
.. it doesn't lock up.
Whats going on here? Thanks for the help.