Skip to content

Commit

Permalink
Don't clear pointer capture unless we had pointer capture (#13489)
Browse files Browse the repository at this point in the history
  • Loading branch information
TomEdwardsEnscape authored and maxkatz6 committed Dec 5, 2023
1 parent f3cee95 commit be8c5ed
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Avalonia.Base/Input/Pointer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ private void OnCaptureDetached(object? sender, VisualTreeAttachmentEventArgs e)

public void Dispose()
{
Capture(null);
if (Captured != null)
{
Capture(null);
}
}

/// <summary>
Expand Down

0 comments on commit be8c5ed

Please sign in to comment.