diff --git a/CefSharp.Wpf.Example/Views/Main/MainViewModel.cs b/CefSharp.Wpf.Example/Views/Main/MainViewModel.cs index aecf0b65a..2e9a524bc 100644 --- a/CefSharp.Wpf.Example/Views/Main/MainViewModel.cs +++ b/CefSharp.Wpf.Example/Views/Main/MainViewModel.cs @@ -125,7 +125,7 @@ namespace CefSharp.Wpf.Example.Views.Main // TODO: This is a bit of a hack. It would be nicer/cleaner to give the webBrowser focus in the Go() // TODO: method, but it seems like "something" gets messed up (= doesn't work correctly) if we give it // TODO: focus "too early" in the loading process... - WebBrowser.LoadCompleted += delegate { Application.Current.Dispatcher.BeginInvoke((Action)(() => webBrowser.Focus())); }; + WebBrowser.LoadCompleted += delegate { Application.Current.Dispatcher.BeginInvoke((Action)(() => WebBrowser.Focus())); }; } break;