diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index 5eae23c2730..045ff46cc9e 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -501,15 +501,14 @@ private async Task OpenResultAsync(string index) // For Dialog Jump and left click mode, we need to navigate to the path if (_isDialogJump && Settings.DialogJumpResultBehaviour == DialogJumpResultBehaviours.LeftClick) { - Hide(); - - if (SelectedResults.SelectedItem != null && DialogWindowHandle != nint.Zero) + if (result is DialogJumpResult dialogJumpResult) { - if (result is DialogJumpResult dialogJumpResult) - { - Win32Helper.SetForegroundWindow(DialogWindowHandle); - _ = Task.Run(() => DialogJump.JumpToPathAsync(DialogWindowHandle, dialogJumpResult.DialogJumpPath)); - } + Win32Helper.SetForegroundWindow(DialogWindowHandle); + _ = Task.Run(() => DialogJump.JumpToPathAsync(DialogWindowHandle, dialogJumpResult.DialogJumpPath)); + } + else + { + App.API.LogError(ClassName, "DialogJumpResult expected but got a different result type."); } } // For query mode, we execute the result