enhance: try to cancel switcher first then other popup

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2025-05-19 10:08:37 +08:00
parent 736991198f
commit aaf53ac694
No known key found for this signature in database

View file

@ -264,8 +264,11 @@ namespace SourceGit.Views
}
else if (e.Key == Key.Escape)
{
vm.ActivePage.CancelPopup();
vm.CancelSwitcher();
if (vm.Switcher != null)
vm.CancelSwitcher();
else
vm.ActivePage.CancelPopup();
e.Handled = true;
return;
}