Skip to content

Commit

Permalink
Merge pull request #1141 from NumbersInternational/fixes/ongotfocus-i…
Browse files Browse the repository at this point in the history
…nit-crash

OnGotFocus no longer calls SetFocus if browser not initialized.
  • Loading branch information
jankurianski committed Jul 23, 2015
2 parents 8afb090 + 695b444 commit 0d8c939
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CefSharp.WinForms/ChromiumWebBrowser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,11 @@ public void NotifyMoveOrResizeStarted()

protected override void OnGotFocus(EventArgs e)
{
SetFocus(true);
if (IsBrowserInitialized)
{
SetFocus(true);
}

base.OnGotFocus(e);
}

Expand Down

0 comments on commit 0d8c939

Please sign in to comment.