From 6d5021d1df49a4b112a076be7b6f39842e3dd6f0 Mon Sep 17 00:00:00 2001 From: "DESKTOP-AICEQIT\\niels" Date: Mon, 10 Jan 2022 16:08:33 +0100 Subject: [PATCH] Only handle a KeyBinding if it's actually been handled. --- src/Avalonia.Input/KeyBinding.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Avalonia.Input/KeyBinding.cs b/src/Avalonia.Input/KeyBinding.cs index 856157eafa..7cb4f443f3 100644 --- a/src/Avalonia.Input/KeyBinding.cs +++ b/src/Avalonia.Input/KeyBinding.cs @@ -35,9 +35,11 @@ namespace Avalonia.Input { if (Gesture?.Matches(args) == true) { - args.Handled = true; - if (Command?.CanExecute(CommandParameter) == true) + if (Command?.CanExecute(CommandParameter) == true) + { + args.Handled = true; Command.Execute(CommandParameter); + } } } }