Browse Source
Merge pull request #2170 from donandren/issues/2148
fix button click
pull/2173/head
Nikita Tsukanov
8 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
3 deletions
-
src/Avalonia.Controls/Button.cs
|
|
|
@ -253,10 +253,8 @@ namespace Avalonia.Controls |
|
|
|
IsPressed = false; |
|
|
|
e.Handled = true; |
|
|
|
|
|
|
|
var hittest = this.GetVisualsAt(e.GetPosition(this)); |
|
|
|
|
|
|
|
if (ClickMode == ClickMode.Release && |
|
|
|
hittest.Any(c => c == this || (c as IStyledElement)?.TemplatedParent == this)) |
|
|
|
this.GetVisualsAt(e.GetPosition(this)).Any(c => this == c || this.IsVisualAncestorOf(c))) |
|
|
|
{ |
|
|
|
OnClick(); |
|
|
|
} |
|
|
|
|