Skip to content

Commit b92461f

Browse files
committed
Only set keyboard handler in Winforms example of using multiThreadedMessageLoopEnabled
1 parent 7f0f7a7 commit b92461f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

CefSharp.WinForms.Example/BrowserTabUserControl.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ public BrowserTabUserControl(Action<string, int?> openNewTab, string url, bool m
4040
browser.JsDialogHandler = new JsDialogHandler();
4141
browser.GeolocationHandler = new GeolocationHandler();
4242
browser.DownloadHandler = new DownloadHandler();
43-
browser.KeyboardHandler = new KeyboardHandler();
43+
if (multiThreadedMessageLoopEnabled)
44+
{
45+
browser.KeyboardHandler = new KeyboardHandler();
46+
}
4447
browser.LifeSpanHandler = new LifeSpanHandler();
4548
browser.LoadingStateChanged += OnBrowserLoadingStateChanged;
4649
browser.ConsoleMessage += OnBrowserConsoleMessage;

0 commit comments

Comments
 (0)