diff --git a/CefSharp.WinForms.Example/FocusHandler.cs b/CefSharp.WinForms.Example/FocusHandler.cs index 95fc004ac..3b0630950 100644 --- a/CefSharp.WinForms.Example/FocusHandler.cs +++ b/CefSharp.WinForms.Example/FocusHandler.cs @@ -35,7 +35,7 @@ namespace CefSharp.WinForms.Example // or because they pressed Shift+Tab on the first link/field (in which case 'next' is false). // Here we always focus on the address bar. - urlTextBox.Focus(); + urlTextBox.Control.BeginInvoke(new MethodInvoker(() => urlTextBox.Focus())); } } } \ No newline at end of file