Browse Source
Stop listening for IsCancel on button detached
pull/8253/head
Max Katz
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
7 additions and
0 deletions
-
src/Avalonia.Controls/Button.cs
|
|
|
@ -232,6 +232,13 @@ namespace Avalonia.Controls |
|
|
|
StopListeningForDefault(inputElement); |
|
|
|
} |
|
|
|
} |
|
|
|
if (IsCancel) |
|
|
|
{ |
|
|
|
if (e.Root is IInputElement inputElement) |
|
|
|
{ |
|
|
|
StopListeningForCancel(inputElement); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
|