Skip to content

Commit 1207e7b

Browse files
committed
Oops, forgot to set focus to address bar on UI thread.
1 parent 25bfc51 commit 1207e7b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CefSharp.WinForms.Example/FocusHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public void OnTakeFocus(bool next)
3535
// or because they pressed Shift+Tab on the first link/field (in which case 'next' is false).
3636

3737
// Here we always focus on the address bar.
38-
urlTextBox.Focus();
38+
urlTextBox.Control.BeginInvoke(new MethodInvoker(() => urlTextBox.Focus()));
3939
}
4040
}
4141
}

0 commit comments

Comments
 (0)