Skip to content

Commit aaf53ac

Browse files
committed
enhance: try to cancel switcher first then other popup
Signed-off-by: leo <[email protected]>
1 parent 7369911 commit aaf53ac

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Views/Launcher.axaml.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,11 @@ protected override void OnKeyDown(KeyEventArgs e)
264264
}
265265
else if (e.Key == Key.Escape)
266266
{
267-
vm.ActivePage.CancelPopup();
268-
vm.CancelSwitcher();
267+
if (vm.Switcher != null)
268+
vm.CancelSwitcher();
269+
else
270+
vm.ActivePage.CancelPopup();
271+
269272
e.Handled = true;
270273
return;
271274
}

0 commit comments

Comments
 (0)