Skip to content

Commit

Permalink
Removed Mouse capture in mouse events
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorjonl committed Feb 22, 2017
1 parent 3b40ca0 commit 5c70fb4
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions CefSharp.Wpf/ChromiumWebBrowser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1904,7 +1904,10 @@ protected override void OnMouseWheel(MouseWheelEventArgs e)
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
private void PopupOpened(object sender, EventArgs e)
{
Mouse.Capture(this);
if (Mouse.Captured != this)
{
Mouse.Capture(this);
}
}

/// <summary>
Expand All @@ -1930,10 +1933,6 @@ protected override void OnMouseDown(MouseButtonEventArgs e)
{
Focus();
OnMouseButton(e);
if (Mouse.Captured != this)
{
Mouse.Capture(this);
}
}

/// <summary>
Expand All @@ -1943,10 +1942,6 @@ protected override void OnMouseDown(MouseButtonEventArgs e)
protected override void OnMouseUp(MouseButtonEventArgs e)
{
OnMouseButton(e);
if (Mouse.Captured == this)
{
Mouse.Capture(null);
}
}

/// <summary>
Expand Down

0 comments on commit 5c70fb4

Please sign in to comment.